Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported Media Type\",\"name\":\"OTLPExporterError\" when using telemetry-to-otlp #259

Open
gopalanand333 opened this issue Nov 29, 2024 · 1 comment
Labels

Comments

@gopalanand333
Copy link

Hi Team,
I am using telemetry-to-otlp and deploy application to kyma runtime, with package.json looks like this:

"dependencies": {
    "@cap-js/hana": "^1",
    "@cap-js/telemetry": ">=0",
    "@grpc/grpc-js": "^1",
    "@opentelemetry/exporter-metrics-otlp-grpc": "^0",
    "@opentelemetry/exporter-metrics-otlp-proto": "^0.55.0",
    "@opentelemetry/exporter-trace-otlp-grpc": "^0",
    "@opentelemetry/exporter-trace-otlp-proto": "^0.55.0",
    "@opentelemetry/host-metrics": "^0",
    "@sap/cds": ">=8",
    "@sap/xssec": "^4",
    "express": "^4"
  },
"[production]": {
        "telemetry": {
          "kind": "telemetry-to-otlp"
        },

Error

2024-11-29T02:40:41.536195408Z {"level":"info","logger":"cds","timestamp":"2024-11-29T02:40:41.534Z","msg":"loaded model from 1 file(s):\n","type":"log"}
2024-11-29T02:40:41.536896541Z   srv/csn.json
2024-11-29T02:40:41.903970021Z {"level":"info","logger":"cds","timestamp":"2024-11-29T02:40:41.902Z","msg":"connect to db > hana {\n  certificate: '...',\n  database_id: 'bc80cfe7-53a8-4216-a8a7-88b44997f337',\n  driver: 'com.sap.db.jdbc.Driver',\n  hdi_password: '...',\n  hdi_user: '1D6B74619D3140D397D052F5F52B360A_5J9XPMZKO0A2FHAFNLF4UBKHQ_DT',\n  host: 'bc80cfe7-53a8-4216-a8a7-88b44997f337.hana.prod-eu12.hanacloud.ondemand.com',\n  password: '...',\n  port: '443',\n  schema: '1D6B74619D3140D397D052F5F52B360A',\n  url: 'jdbc:sap://bc80cfe7-53a8-4216-a8a7-88b44997f337.hana.prod-eu12.hanacloud.ondemand.com:443?encrypt=true&validateCertificate=true&currentschema=1D6B74619D3140D397D052F5F52B360A',\n  user: '1D6B74619D3140D397D052F5F52B360A_5J9XPMZKO0A2FHAFNLF4UBKHQ_RT'\n}","type":"log"}
2024-11-29T02:40:41.948611207Z {"level":"info","logger":"cds","timestamp":"2024-11-29T02:40:41.948Z","msg":"using auth strategy {\n  kind: 'xsuaa',\n  impl: '../layers/paketo-buildpacks_npm-install/launch-modules/node_modules/@sap/cds/lib/srv/middlewares/auth/jwt-auth'\n} \n","type":"log"}
2024-11-29T02:40:41.978843936Z {"level":"info","logger":"cds","timestamp":"2024-11-29T02:40:41.978Z","msg":"using new OData adapter","type":"log"}
2024-11-29T02:40:41.992007746Z {"level":"info","logger":"cds","timestamp":"2024-11-29T02:40:41.991Z","msg":"serving ProcessorService { impl: 'srv/services.js', path: '/odata/v4/processor' }","type":"log"}
2024-11-29T02:40:41.992547017Z {"level":"info","logger":"cds","timestamp":"2024-11-29T02:40:41.992Z","msg":"serving AdminService { impl: 'srv/services.js', path: '/odata/v4/admin' }","type":"log"}
2024-11-29T02:40:42.108227194Z 
2024-11-29T02:40:42.108250215Z {"level":"info","logger":"cds","timestamp":"2024-11-29T02:40:42.106Z","msg":"server listening on { url: 'http://localhost:8080' }","type":"log"}
2024-11-29T02:40:42.108253185Z [cds] - launched at 11/29/2024, 2:40:41 AM, version: 8.5.0, in: 710.288ms
2024-11-29T02:40:48.568054181Z {"level":"error","logger":"telemetry","timestamp":"2024-11-29T02:40:48.567Z","msg":"{\"stack\":\"OTLPExporterError: Unsupported Media Type\\n    at IncomingMessage.<anonymous> (/layers/paketo-buildpacks_npm-install/launch-modules/node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/node/http-transport-utils.js:62:31)\\n    at /layers/paketo-buildpacks_npm-install/launch-modules/node_modules/@opentelemetry/context-async-hooks/build/src/AbstractAsyncHooksContextManager.js:50:55\\n    at AsyncLocalStorage.run (node:async_hooks:335:14)\\n    at AsyncLocalStorageContextManager.with (/layers/paketo-buildpacks_npm-install/launch-modules/node_modules/@opentelemetry/context-async-hooks/build/src/AsyncLocalStorageContextManager.js:33:40)\\n    at IncomingMessage.contextWrapper (/layers/paketo-buildpacks_npm-install/launch-modules/node_modules/@opentelemetry/context-async-hooks/build/src/AbstractAsyncHooksContextManager.js:50:32)\\n    at IncomingMessage.emit (node:events:531:35)\\n    at endReadableNT (node:internal/streams/readable:1696:12)\\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\",\"message\":\"Unsupported Media Type\",\"name\":\"OTLPExporterError\",\"code\":\"415\"}","type":"log"}
2024-11-29T02:40:58.520264917Z {"level":"error","logger":"telemetry","timestamp":"2024-11-29T02:40:58.519Z","msg":"{\"stack\":\"OTLPExporterError: Unsupported Media Type\\n    at IncomingMessage.<anonymous> (/layers/paketo-buildpacks_npm-install/launch-modules/node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/node/http-transport-utils.js:62:31)\\n    at /layers/paketo-buildpacks_npm-install/launch-modules/node_modules/@opentelemetry/context-async-hooks/build/src/AbstractAsyncHooksContextManager.js:50:55\\n    at AsyncLocalStorage.run (node:async_hooks:335:14)\\n    at AsyncLocalStorageContextManager.with (/layers/paketo-buildpacks_npm-install/launch-modules/node_modules/@opentelemetry/context-async-hooks/build/src/AsyncLocalStorageContextManager.js:33:40)\\n    at IncomingMessage.contextWrapper (/layers/paketo-buildpacks_npm-install/launch-modules/node_modules/@opentelemetry/context-async-hooks/build/src/AbstractAsyncHooksContextManager.js:50:32)\\n    at IncomingMessage.emit (node:events:531:35)\\n    at endReadableNT (node:internal/streams/readable:1696:12)\\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\",\"message\":\"Unsupported Media Type\",\"name\":\"OTLPExporterError\",\"code\":\"415\"}","type":"log"}
@github-actions github-actions bot added the new label Nov 29, 2024
@sjvans
Copy link
Contributor

sjvans commented Dec 2, 2024

hi @gopalanand333

why do you have both grpc and protobuf exporters? you should only have one. please see https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/ on how to configure which is used via env vars.

best,
sebastian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants