Description
Component(s)
exporter/googlecloud
What happened?
Description
I am trying out Google Cloud and am trying to export OpenTelemetry traces from a test curl script on my laptop to Google Cloud. I can send data to the collector, but I consistently get the following response:
{ "partialSuccess": {} }
This indicates that my requests reach the server, but that the data isn't exporting. I don't see any results in my traces dashboard.
I also tried sending traces from a test Rust program I have on my machine, in case there was a problem with non-unique IDs being filtered. Nothing seems to export.
I can't seem to get any access to logs either. The OTel documentation says errors should be going to stderr
but the collector doesn't report anything other than some startup info.
Steps to Reproduce
I followed these instructions to make sure the agent and service account are enabled and configured:
https://cloud.google.com/monitoring/agent/ops-agent/install-agent-vm-creation
https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/otlp#config-overview
https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/otlp#otlp-traces
I created a service key using the console
option here:
https://cloud.google.com/iam/docs/keys-create-delete#iam-service-account-keys-create-console
I get version 0.123.0 of the googlecloud exporter from Docker
My Docker deploy:
docker run \
--hostname otel-collector \
--volume $(pwd)/gcloud_collector/service_acct_key.json:/etc/otelcol-contrib/key.json \
--volume $(pwd)/gcloud_collector/config.yaml:/etc/otelcol-contrib/config.yaml \
--env GOOGLE_APPLICATION_CREDENTIALS=/etc/otelcol-contrib/key.json \
--publish 127.0.0.1:4317:4317 \
--publish 127.0.0.1:4318:4318 \
--name google-otel-exporter \
otel/opentelemetry-collector-contrib:0.123.0
Test script:
curl -X POST http://127.0.0.1:4318/v1/traces \
-H "Content-Type: application/json" \
--data @trace.json \
--verbose
Trace data:
{
"resourceSpans": [
{
"resource": {
"attributes": [
{
"key": "service.name",
"value": {
"stringValue": "manual-curl-test"
}
}
]
},
"scopeSpans": [
{
"scope": {
"name": "example-tracer"
},
"spans": [
{
"traceId": "4fd0b8e2e1d7b25cc63a8f0c9f8c3c1e",
"spanId": "2b9f9b7e5b3efc92",
"name": "curl-span",
"kind": "SPAN_KIND_INTERNAL",
"startTimeUnixNano": "1680811200000000000",
"endTimeUnixNano": "1680811210000000000",
"attributes": [
{
"key": "http.method",
"value": {
"stringValue": "GET"
}
}
]
}
]
}
]
}
]
}
Expected Result
I should see a trace in my trace dashboard in Google Cloud
Actual Result
Traces dashboard is always empty
Collector version
0.123.0
Environment information
Environment
MacOS Sequoia 15.3.1
Docker Desktop 4.37.2
OpenTelemetry Collector configuration
receivers:
otlp:
protocols:
grpc:
http:
endpoint: otel-collector:4318
cors:
allowed_origins:
- "*"
exporters:
googlecloud:
project: "[redacted]"
service:
pipelines:
traces:
receivers: [otlp]
exporters: [googlecloud]
Log output
2025-04-07T15:06:17.080Z info [email protected]/service.go:197 Setting up own telemetry...
2025-04-07T15:06:17.081Z info [email protected]/service.go:264 Starting otelcol-contrib... {"Version": "0.123.0", "NumCPU": 12}
2025-04-07T15:06:17.081Z info extensions/extensions.go:41 Starting extensions...
2025-04-07T15:06:17.082Z info [email protected]/otlp.go:116 Starting GRPC server {"endpoint": "localhost:4317"}
2025-04-07T15:06:17.082Z info [email protected]/otlp.go:173 Starting HTTP server {"endpoint": "otel-collector:4318"}
2025-04-07T15:06:17.082Z info [email protected]/service.go:287 Everything is ready. Begin running and processing data.
Additional context
No response