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

Don't send logs or traces for transport-otlp-http if their respective URLs are not defined #727

Open
pbhuynh opened this issue Nov 5, 2024 · 0 comments
Labels
bug Report a bug

Comments

@pbhuynh
Copy link

pbhuynh commented Nov 5, 2024

Description

Currently, tracesURL and logsURL are both optional for @grafana/transport-otlp-http.

In our application, we only need traces so we don't have logsURL defined. However, the transport is still trying to send out resourceLogs to an undefined logsURL.

Steps to reproduce

import { getWebInstrumentations, initializeFaro } from '@grafana/faro-react';
import { OtlpHttpTransport } from '@grafana/faro-transport-otlp-http';

initializeFaro({
  // ...
  instrumentations: [
    // Load the default Web instrumentations
    ...getWebInstrumentations(),
  ],
  transports: [
    new OtlpHttpTransport({
      apiKey: env.faro.apiKey,
      // No logsURL defined
      tracesURL: 'https://example.com/v1/traces',
    }),
  ],
});

Expected behavior

If the url for the traces or logs endpoints aren't defined, then don't send the payloads.

@pbhuynh pbhuynh added the bug Report a bug label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report a bug
Projects
None yet
Development

No branches or pull requests

1 participant