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

instrumentation-load.js in frontend does not seem to work..? #97

Open
howardyoo opened this issue Oct 12, 2024 · 0 comments
Open

instrumentation-load.js in frontend does not seem to work..? #97

howardyoo opened this issue Oct 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@howardyoo
Copy link
Contributor

symptom

Even though the instrumentation-load.js which covers the otel web instrumentation is loaded, it does not seem to emit any traces.
steps to reproduce:

  1. open up the /src/frontend/dist/instrumentation-load.js
  2. modify the line that has the settings for receiving traces to the local opentelemetry collector - which should be able to receive the traces.
    change
const exporter = new _opentelemetryExporterCollector.CollectorTraceExporter({
  url: 'https://microservicescollector.honeydemo.io:443/v1/traces'
});

into:

const exporter = new _opentelemetryExporterCollector.CollectorTraceExporter({
    url: 'http://opentelemetry-collector:4319/v1/traces'
  });

(port 4318 also works, as it is another http otel port)

  1. Run the microservice-demo.
  2. observe that there is no trace flowing into the designated dataset (which is microservices-browser)

I have tried similar approach using another bundled otel web sdk js that I made, and it was able to send traces properly to the endpoint, so I am suspecting that something in the instrumentation-load.js is not working properly (I'm not sure what, though). Anyway, thought it would be helpful to report it.

@howardyoo howardyoo added the bug Something isn't working label Oct 12, 2024
@howardyoo howardyoo assigned McSick and puckpuck and unassigned puckpuck and McSick Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants