if (tempo.enabled) {
const traceExporter = new OTLPTraceExporterGrpc({
url: `https://tempo-${tempo.zone}.grafana.net/tempo`,
headers: {
Authorization: `Basic ${Base64.to(`${tempo.userId}:${tempo.apiKey}`)}`,
},
})
traceProvider.addSpanProcessor(new OtelSdk.tracing.BatchSpanProcessor(traceExporter))
}
But it fails at runtime like so:
{"stack":"Error: 13 INTERNAL: Received RST_STREAM with code 0\n at callErrorFromStatus (/Users/jasonkuhrt/projects/prisma/pdp-control-plane/node_modules/.pnpm/@grpc+grpc-js@1.8.4/node_modules/@grpc/grpc-js/src/call.ts:81:17)\n at Object.onReceiveStatus (/Users/jasonkuhrt/projects/prisma/pdp-control-plane/node_modules/.pnpm/@grpc+grpc-js@1.8.4/node_modules/@grpc/grpc-js/src/client.ts:356:55)\n at Object.onReceiveStatus (/Users/jasonkuhrt/projects/prisma/pdp-control-plane/node_modules/.pnpm/@grpc+grpc-js@1.8.4/node_modules/@grpc/grpc-js/src/client-interceptors.ts:455:34)\n at Object.onReceiveStatus (/Users/jasonkuhrt/projects/prisma/pdp-control-plane/node_modules/.pnpm/@grpc+grpc-js@1.8.4/node_modules/@grpc/grpc-js/src/client-interceptors.ts:417:48)\n at /Users/jasonkuhrt/projects/prisma/pdp-control-plane/node_modules/.pnpm/@grpc+grpc-js@1.8.4/node_modules/@grpc/grpc-js/src/resolving-call.ts:110:24\n at processTicksAndRejections (node:internal/process/task_queues:78:11)\nfor call at\n at ServiceClientImpl.makeUnaryRequest (/Users/jasonkuhrt/projects/prisma/pdp-control-plane/node_modules/.pnpm/@grpc+grpc-js@1.8.4/node_modules/@grpc/grpc-js/src/client.ts:326:30)\n at ServiceClientImpl.<anonymous> (/Users/jasonkuhrt/projects/prisma/pdp-control-plane/node_modules/.pnpm/@grpc+grpc-js@1.8.4/node_modules/@grpc/grpc-js/src/make-client.ts:189:15)\n at OTLPTraceExporter.send [as _send] (/Users/jasonkuhrt/projects/prisma/pdp-control-plane/node_modules/.pnpm/@opentelemetry+otlp-grpc-exporter-base@0.35.0_@opentelemetry+api@1.4.0/node_modules/@opentelemetry/otlp-grpc-exporter-base/src/util.ts:105:35)\n at /Users/jasonkuhrt/projects/prisma/pdp-control-plane/node_modules/.pnpm/@opentelemetry+otlp-grpc-exporter-base@0.35.0_@opentelemetry+api@1.4.0/node_modules/@opentelemetry/otlp-grpc-exporter-base/src/OTLPGRPCExporterNodeBase.ts:70:12\n at new Promise (<anonymous>)\n at OTLPTraceExporter._sendPromise (/Users/jasonkuhrt/projects/prisma/pdp-control-plane/node_modules/.pnpm/@opentelemetry+otlp-grpc-exporter-base@0.35.0_@opentelemetry+api@1.4.0/node_modules/@opentelemetry/otlp-grpc-exporter-base/src/OTLPGRPCExporterNodeBase.ts:69:21)\n at Immediate.<anonymous> (/Users/jasonkuhrt/projects/prisma/pdp-control-plane/node_modules/.pnpm/@opentelemetry+otlp-grpc-exporter-base@0.35.0_@opentelemetry+api@1.4.0/node_modules/@opentelemetry/otlp-grpc-exporter-base/src/OTLPGRPCExporterNodeBase.ts:108:14)\n at processImmediate (node:internal/timers:466:21)\n at process.topLevelDomainCallback (node:domain:161:15)\n at process.callbackTrampoline (node:internal/async_hooks:128:24)","message":"13 INTERNAL: Received RST_STREAM with code 0","code":"13","details":"Received RST_STREAM with code 0","metadata":"[object Object]","progress":"PROCESSED","name":"Error"}
Any help appreciated. Somehow the Grafana docs fail to cover this topic (of sending traces directly from an application, assuming all users want to setup an agent).
Credentials are proven good because I was able to send traces through the collector. The issue is when trying to send directly from the app. Zone is good too: eu-west-0.
It is a gRPC protocol (not a plain HTTP protocol), so it is more complicated. Yes, Postman and Insomnia can make gRPC request, but it is not so easy as HTTP request.
I have no idea what HTTP method is being used but that should be handled by the respective spec compliant libraries. As well, this is gRPC, not the vanilla HTTP exporter. Does method even matter? etc.
Hi, I’ve not used this library, but looking at the examples in the repo it mentions plaintext is used by default and TLS must be enabled. Can you try the same? This section and the line is:
as I had the same issue: Probably you created your API key at https://<YOUR_ORG>.grafana.net/org/apikeys. Instead, create the API key at https://grafana.com/orgs/<YOUR_ORG>/api-keys. There, you can also select the MetricsPublisher role as stated in the documentation.
Just use the complete URL, even with grpc, meaning: https://tempo-<ZONE>.grafana.net/tempo