Skip to content

Commit

Permalink
chore(examples/react-load): use exported strings for attributes (#2127)
Browse files Browse the repository at this point in the history
Use exported strings for Semantic Attributes

Refs: #2025
  • Loading branch information
maryliag committed Apr 25, 2024
1 parent b0ac2c9 commit c96293d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions examples/react-load/react/package.json
Expand Up @@ -43,6 +43,7 @@
"@opentelemetry/plugin-react-load": "^0.23.0",
"@opentelemetry/sdk-trace-base": "^0.25.0",
"@opentelemetry/sdk-trace-web": "^0.25.0",
"@opentelemetry/semantic-conventions": "^1.23.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-router-dom": "^5.2.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/react-load/react/src/web-tracer.js
Expand Up @@ -5,12 +5,12 @@ import { ZoneContextManager } from '@opentelemetry/context-zone';
import { CollectorTraceExporter } from '@opentelemetry/exporter-collector';
import { diag, DiagConsoleLogger } from '@opentelemetry/api';
import { Resource } from '@opentelemetry/resources';
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'
import { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions'

export default (serviceName) => {
const provider = new WebTracerProvider({
resource: new Resource({
[SemanticResourceAttributes.SERVICE_NAME]: "react-load-example"
[SEMRESATTRS_SERVICE_NAME]: "react-load-example"
}),
});

Expand Down

0 comments on commit c96293d

Please sign in to comment.