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

chore(instrumentation-bunyan): use strings exported for attributes #2195

Merged
merged 5 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions plugins/node/opentelemetry-instrumentation-bunyan/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ const logger = bunyan.createLogger({
});
```

## Semantic Conventions

This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which implements Semantic Convention [Version 1.7.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/semantic_conventions/README.md)

Copy link
Contributor

@trentm trentm May 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kinda think this should be dropped. The only use a semconv in this package is in the tests to use the SERVICE_NAME constant. The dep is a dev-dep.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

## Useful links

- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@opentelemetry/sdk-logs": "^0.51.0",
"@opentelemetry/sdk-trace-base": "^1.8.0",
"@opentelemetry/sdk-trace-node": "^1.8.0",
"@opentelemetry/semantic-conventions": "^1.0.0",
"@opentelemetry/semantic-conventions": "^1.23.0",
"@types/mocha": "7.0.2",
"@types/node": "18.6.5",
"@types/sinon": "10.0.18",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';
import { isWrapped } from '@opentelemetry/instrumentation';
import { Resource } from '@opentelemetry/resources';
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions';
import * as assert from 'assert';
import * as sinon from 'sinon';
import { Writable } from 'stream';
Expand All @@ -48,7 +48,7 @@ tracerProvider.addSpanProcessor(
const tracer = tracerProvider.getTracer('default');

const resource = new Resource({
[SemanticResourceAttributes.SERVICE_NAME]: 'test-instrumentation-bunyan',
[SEMRESATTRS_SERVICE_NAME]: 'test-instrumentation-bunyan',
});
const loggerProvider = new LoggerProvider({ resource });
const memExporter = new InMemoryLogRecordExporter();
Expand Down
Loading