-
Notifications
You must be signed in to change notification settings - Fork 72
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
feat: add web tracing to default instruments #971
base: main
Are you sure you want to change the base?
Conversation
4fb9de7
to
0735f2b
Compare
Breaking change bc customers who have no tracing today will get it by default. Edit: |
@@ -0,0 +1,3 @@ | |||
import { TextDecoder, TextEncoder } from 'node:util'; | |||
|
|||
Object.assign(global, { TextEncoder, TextDecoder }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just so I understand why do we need to do this in a few places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this came with otel dependendencies
if (tracingEnabled && instrumentations.find((i) => i.name === '@grafana/faro-web-tracing')) { | ||
filteredInstrumentations = instrumentations.filter( | ||
(instrumentation) => instrumentation.name !== TracingInstrumentation.name | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this just makes sure the old tracing instrumentation is not enabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This to disable the internal tracing instrumentation if the standalone web-tracing package is already in use.
// TODO this should not be part of faro-core because it is a concern of the web-sdk package. | ||
// We eventually will refactor all faro packages so the Config can be extended with package specific options. | ||
// We also will remove all package specific functionality from the faro-core package. | ||
// For time reasons and conflicting priorities, we will leave it here for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this part is in web-sdk - is this a leftover from copy paste?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ned to adjust the text
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good just a couple questions for my own understanding
Why
Work in process
For easy of use include the web-tracing instrumentation in the default instrumentations.
If existing users already use the web-tracing package Faro takes care of removing the default web-tracing package
This how the config changes
new way with web-tracing auto instrumentation if no customization is needed
New way, with web-tracing auto instrumentation and additional tracing configuration
Current state
What
Links
Checklist