Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions confgenerator/confgenerator.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ func ConvertPipelinesToOtlp(receiverPipelines map[string]otel.ReceiverPipeline)
pipeline.ExporterTypes["logs"] = otel.OTLP_Logs
}
}

if _, ok := pipeline.ExporterTypes["traces"]; ok {
if pipeline.ExporterTypes["traces"] == otel.OTel {
pipeline.ExporterTypes["traces"] = otel.OTLP_Traces
}
}
receiverPipelines[rID] = pipeline
}
}
Expand Down Expand Up @@ -173,6 +179,21 @@ func otlpExporterForLogs(userAgent string) otel.Component {
}
}

func otlpExporterForTraces(userAgent string) otel.Component {
return otel.Component{
Type: "otlp_grpc",
Config: map[string]interface{}{
"endpoint": "telemetry.googleapis.com:443",
// b/485538253: Use pick_first balancer until we can understand why round_robin is failing.
"balancer_name": "pick_first",
"auth": map[string]interface{}{
"authenticator": "googleclientauth",
},
"user_agent": userAgent,
},
}
}

func googleManagedPrometheusExporter(userAgent string) otel.Component {
return otel.Component{
Type: "googlemanagedprometheus",
Expand Down Expand Up @@ -279,6 +300,17 @@ func (uc *UnifiedConfig) GenerateOtelConfig(ctx context.Context, outDir, stateDi
},
},
},
otel.OTLP_Traces: {
Exporter: otlpExporterForTraces(userAgent),
UsedExtensions: []string{googleClientAuthExtensionType},
ProcessorsByType: map[string][]otel.Component{
"traces": {
// Note: resourcedetection processor is added automatically at the receiver pipeline level in otel/modular.go.
otel.GCPProjectID(resource.ProjectName()),
otel.BatchProcessor(200, 200, "200ms"),
},
},
},
otel.Logging: {
Exporter: googleCloudLoggingExporter(),
UsedExtensions: []string{fileStorageExtensionType},
Expand Down
3 changes: 3 additions & 0 deletions confgenerator/otel/modular.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const (
GMP
OTLP_Metrics
OTLP_Logs
OTLP_Traces
Logging
)
const (
Expand All @@ -62,6 +63,8 @@ func (t ExporterType) Name() string {
return "otlp_metrics"
} else if t == OTLP_Logs {
return "otlp_logs"
} else if t == OTLP_Traces {
return "otlp_traces"
} else {
panic("unknown ExporterType")
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
exporters:
googlecloud/otel:
metric:
instrumentation_library_labels: true
prefix: ""
resource_filters: []
service_resource_labels: true
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
googlemanagedprometheus:
metric:
add_metric_suffixes: false
Expand Down Expand Up @@ -35,6 +27,12 @@ exporters:
balancer_name: pick_first
endpoint: telemetry.googleapis.com:443
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
otlp_grpc/otlp_traces:
auth:
authenticator: googleclientauth
balancer_name: pick_first
endpoint: telemetry.googleapis.com:443
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
extensions:
file_storage:
create_directory: true
Expand All @@ -48,6 +46,10 @@ processors:
send_batch_max_size: 200
send_batch_size: 200
timeout: 200ms
batch/otlp_grpc/otlp_traces_traces_1:
send_batch_max_size: 200
send_batch_size: 200
timeout: 200ms
cumulativetodelta/loggingmetrics_4:
include:
match_type: strict
Expand Down Expand Up @@ -863,6 +865,11 @@ processors:
- action: insert
key: gcp.project_id
value: test-project
resource/otlp_grpc/otlp_traces_traces_0:
attributes:
- action: insert
key: gcp.project_id
value: test-project
resourcedetection/_global_0:
detectors:
- gcp
Expand Down Expand Up @@ -1385,9 +1392,11 @@ service:
- otlp/otlp
traces/traces_otlp_otlp:
exporters:
- googlecloud/otel
- otlp_grpc/otlp_traces
processors:
- resourcedetection/_global_1
- resource/otlp_grpc/otlp_traces_traces_0
- batch/otlp_grpc/otlp_traces_traces_1
receivers:
- otlp/otlp
telemetry:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
exporters:
googlecloud/otel:
metric:
instrumentation_library_labels: true
prefix: ""
resource_filters: []
service_resource_labels: true
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
googlemanagedprometheus:
metric:
add_metric_suffixes: false
Expand Down Expand Up @@ -35,6 +27,12 @@ exporters:
balancer_name: pick_first
endpoint: telemetry.googleapis.com:443
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
otlp_grpc/otlp_traces:
auth:
authenticator: googleclientauth
balancer_name: pick_first
endpoint: telemetry.googleapis.com:443
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
extensions:
file_storage:
create_directory: true
Expand All @@ -48,6 +46,10 @@ processors:
send_batch_max_size: 200
send_batch_size: 200
timeout: 200ms
batch/otlp_grpc/otlp_traces_traces_1:
send_batch_max_size: 200
send_batch_size: 200
timeout: 200ms
cumulativetodelta/loggingmetrics_4:
include:
match_type: strict
Expand Down Expand Up @@ -834,6 +836,11 @@ processors:
- action: insert
key: gcp.project_id
value: test-project
resource/otlp_grpc/otlp_traces_traces_0:
attributes:
- action: insert
key: gcp.project_id
value: test-project
resourcedetection/_global_0:
detectors:
- gcp
Expand Down Expand Up @@ -1325,9 +1332,11 @@ service:
- otlp/otlp
traces/traces_otlp_otlp:
exporters:
- googlecloud/otel
- otlp_grpc/otlp_traces
processors:
- resourcedetection/_global_1
- resource/otlp_grpc/otlp_traces_traces_0
- batch/otlp_grpc/otlp_traces_traces_1
receivers:
- otlp/otlp
telemetry:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
exporters:
googlecloud/otel:
metric:
instrumentation_library_labels: true
prefix: ""
resource_filters: []
service_resource_labels: true
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version)
googlemanagedprometheus:
metric:
add_metric_suffixes: false
Expand Down Expand Up @@ -35,6 +27,12 @@ exporters:
balancer_name: pick_first
endpoint: telemetry.googleapis.com:443
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version)
otlp_grpc/otlp_traces:
auth:
authenticator: googleclientauth
balancer_name: pick_first
endpoint: telemetry.googleapis.com:443
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version)
extensions:
file_storage:
create_directory: true
Expand All @@ -48,6 +46,10 @@ processors:
send_batch_max_size: 200
send_batch_size: 200
timeout: 200ms
batch/otlp_grpc/otlp_traces_traces_1:
send_batch_max_size: 200
send_batch_size: 200
timeout: 200ms
cumulativetodelta/loggingmetrics_4:
include:
match_type: strict
Expand Down Expand Up @@ -896,6 +898,11 @@ processors:
- action: insert
key: gcp.project_id
value: test-project
resource/otlp_grpc/otlp_traces_traces_0:
attributes:
- action: insert
key: gcp.project_id
value: test-project
resourcedetection/_global_0:
detectors:
- gcp
Expand Down Expand Up @@ -1875,9 +1882,11 @@ service:
- otlp/otlp
traces/traces_otlp_otlp:
exporters:
- googlecloud/otel
- otlp_grpc/otlp_traces
processors:
- resourcedetection/_global_1
- resource/otlp_grpc/otlp_traces_traces_0
- batch/otlp_grpc/otlp_traces_traces_1
receivers:
- otlp/otlp
telemetry:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
exporters:
googlecloud/otel:
metric:
instrumentation_library_labels: true
prefix: ""
resource_filters: []
service_resource_labels: true
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version)
googlemanagedprometheus:
metric:
add_metric_suffixes: false
Expand Down Expand Up @@ -35,6 +27,12 @@ exporters:
balancer_name: pick_first
endpoint: telemetry.googleapis.com:443
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version)
otlp_grpc/otlp_traces:
auth:
authenticator: googleclientauth
balancer_name: pick_first
endpoint: telemetry.googleapis.com:443
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version)
extensions:
file_storage:
create_directory: true
Expand All @@ -48,6 +46,10 @@ processors:
send_batch_max_size: 200
send_batch_size: 200
timeout: 200ms
batch/otlp_grpc/otlp_traces_traces_1:
send_batch_max_size: 200
send_batch_size: 200
timeout: 200ms
cumulativetodelta/loggingmetrics_4:
include:
match_type: strict
Expand Down Expand Up @@ -896,6 +898,11 @@ processors:
- action: insert
key: gcp.project_id
value: test-project
resource/otlp_grpc/otlp_traces_traces_0:
attributes:
- action: insert
key: gcp.project_id
value: test-project
resourcedetection/_global_0:
detectors:
- gcp
Expand Down Expand Up @@ -1875,9 +1882,11 @@ service:
- otlp/otlp
traces/traces_otlp_otlp:
exporters:
- googlecloud/otel
- otlp_grpc/otlp_traces
processors:
- resourcedetection/_global_1
- resource/otlp_grpc/otlp_traces_traces_0
- batch/otlp_grpc/otlp_traces_traces_1
receivers:
- otlp/otlp
telemetry:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
exporters:
googlecloud/otel:
metric:
instrumentation_library_labels: true
prefix: ""
resource_filters: []
service_resource_labels: true
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
googlemanagedprometheus:
metric:
add_metric_suffixes: false
Expand Down Expand Up @@ -35,6 +27,12 @@ exporters:
balancer_name: pick_first
endpoint: telemetry.googleapis.com:443
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
otlp_grpc/otlp_traces:
auth:
authenticator: googleclientauth
balancer_name: pick_first
endpoint: telemetry.googleapis.com:443
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
extensions:
file_storage:
create_directory: true
Expand All @@ -48,6 +46,10 @@ processors:
send_batch_max_size: 200
send_batch_size: 200
timeout: 200ms
batch/otlp_grpc/otlp_traces_traces_1:
send_batch_max_size: 200
send_batch_size: 200
timeout: 200ms
cumulativetodelta/loggingmetrics_4:
include:
match_type: strict
Expand Down Expand Up @@ -863,6 +865,11 @@ processors:
- action: insert
key: gcp.project_id
value: test-project
resource/otlp_grpc/otlp_traces_traces_0:
attributes:
- action: insert
key: gcp.project_id
value: test-project
resourcedetection/_global_0:
detectors:
- gcp
Expand Down Expand Up @@ -1270,9 +1277,11 @@ service:
- otlp/otlp
traces/traces_otlp_otlp:
exporters:
- googlecloud/otel
- otlp_grpc/otlp_traces
processors:
- resourcedetection/_global_1
- resource/otlp_grpc/otlp_traces_traces_0
- batch/otlp_grpc/otlp_traces_traces_1
receivers:
- otlp/otlp
telemetry:
Expand Down
Loading
Loading