Skip to content

Commit c2ec619

Browse files
authored
Merge branch 'main' into feat/mcp-agent-filtering
2 parents eb3eb62 + 549c0d7 commit c2ec619

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

go/adk/pkg/telemetry/attributes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func setSpanAttributes(ctx context.Context, attrs ...attribute.KeyValue) {
9696
}
9797

9898
func marshalSpanPayload(value any) string {
99-
if !strings.EqualFold(strings.TrimSpace(os.Getenv(captureMessageContentEnvVar)), "true") {
99+
if strings.EqualFold(strings.TrimSpace(os.Getenv(captureMessageContentEnvVar)), "false") {
100100
return "{}"
101101
}
102102
if value == nil {

go/adk/pkg/telemetry/tracing.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"net/url"
66
"os"
77
"strings"
8+
"time"
89

910
"go.opentelemetry.io/otel"
1011
"go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc"
@@ -95,7 +96,15 @@ func newGRPCTracerProvider(ctx context.Context, res *resource.Resource) (*sdktra
9596
traceEndpoint = strings.TrimSpace(os.Getenv("OTEL_EXPORTER_OTLP_ENDPOINT"))
9697
}
9798

98-
var opts []otlptracegrpc.Option
99+
opts := []otlptracegrpc.Option{
100+
// Retry on transient failures
101+
otlptracegrpc.WithRetry(otlptracegrpc.RetryConfig{
102+
Enabled: true,
103+
InitialInterval: 1 * time.Second,
104+
MaxInterval: 5 * time.Second,
105+
MaxElapsedTime: 30 * time.Second,
106+
}),
107+
}
99108
if traceEndpoint != "" {
100109
// If the endpoint has a valid scheme, host, port, path ("scheme://host:port/path"), set endpoint url.
101110
if u, err := url.Parse(traceEndpoint); err == nil && u.Scheme != "" && u.Host != "" {

0 commit comments

Comments
 (0)