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

Fix OpenTelemetryService initialisation code #6775

Closed

Conversation

pkukielka
Copy link
Contributor

Changes

  1. Fixing problem with externalAuthRefreshChanges not having initial value which was blocking the configuration
  2. Making caching checks more correct

I discovered one problem though.

Restarting trace exported does not really work.
It always throw an error:

"OTLPExporterError: Unprocessable Entity
\tat IncomingMessage.<anonymous> (/Users/pkukielka/Work/sourcegraph/cody2/vscode/dist/extension.node.js:183479:31)
\tat IncomingMessage.emit (node:events:530:35)
\tat IncomingMessage.emit (node:domain:489:12)
\tat endReadableNT (node:internal/streams/readable:1698:12)
\tat process.processTicksAndRejections (node:internal/process/task_queues:82:21)"

We catch this error and re-initialisation seems to be passing, but then CodyTraceExporter::export is never called after that.

Test plan

Tested with debugger by:

  1. Adding "cody.experimental.tracing": true to the config
  2. Starting VSC
  3. Asking a chat question
  4. Making sure CodyTraceExporter::export was executed

Then

  1. Setting cody.experimental.tracing to false
  2. Restarting VSC
  3. Asking a chat question
  4. Making sure CodyTraceExporter::export was NOT executed

@pkukielka pkukielka closed this Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant