-
Notifications
You must be signed in to change notification settings - Fork 214
@W-18759755 - Creating tests and a server for open telemetry within the pwa-kit-rea… #2617
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
Changes from 7 commits
ae56f79
b442012
6f50178
c6c1d89
f03ca23
245f60d
a6d0bb7
dc48667
e246905
40c3da9
8095da0
6cc769a
c2f1b91
9130b9a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,74 @@ | ||||||||||||||||||
| /* | ||||||||||||||||||
| * Copyright (c) 2024, Salesforce, Inc. | ||||||||||||||||||
|
||||||||||||||||||
| * Copyright (c) 2024, Salesforce, Inc. | |
| * Copyright (c) 2025, Salesforce, Inc. |
Outdated
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.
Would you consider making the telemetry configurable by passing options to the initializeServerTracing?
Something like this:
| export const initializeServerTracing = () => { | |
| export const initializeServerTracing = (options={}) => { | |
| const { | |
| serviceName = process.env.OTEL_SERVICE_NAME || DEFAULT_SERVICE_NAME, | |
| serviceVersion = process.env.npm_package_version, | |
| enabled = process.env.OTEL_SDK_ENABLED=== 'true' | |
| } = options | |
| ... |
Outdated
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.
Did you look into the deprecation warnings?
It looks like SemanticResourceAttributes is deprecated an we should instead SEMRESATTRS_SERVICE_NAME
Outdated
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.
Let's emit the log warnings using the PWAKitLogger to add a namespace.
E.g.
| logger.error(cause, {namespace: 'react-rendering.render'}) |
Outdated
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.
Same, let's use logger instead of directly using console.
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.
Do we need to include the
@opentelemetry/corepackage here? We are not importing anything from this package in the newopentelemetry-server.jsfileThere 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.
I was migrating all the packages from the POC branch into this package.json but I can remove the core package.