Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
change ID to Id
  • Loading branch information
maryliag committed Apr 12, 2024
commit a6a779f7e305dcec9453dd3b0a1f42bb7dbb9854
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/
### :rocket: (Enhancement)

* feat(sdk-trace-base): log resource attributes in ConsoleSpanExporter [#4605](https://github.com/open-telemetry/opentelemetry-js/pull/4605) @pichlermarc
* feat(resources): new experimental detector ServiceInstanceIDDetectorSync that sets the value for `service.instance.id` as random UUID.
* feat(resources): new experimental detector ServiceInstanceIdDetectorSync that sets the value for `service.instance.id` as random UUID.

### :bug: (Bug Fix)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import {
processDetector,
hostDetector,
Resource,
serviceInstanceIDDetectorSync,
serviceInstanceIdDetectorSync,
} from '@opentelemetry/resources';
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
import { logs } from '@opentelemetry/api-logs';
Expand Down Expand Up @@ -704,7 +704,7 @@ describe('Node SDK', () => {
processDetector,
envDetector,
hostDetector,
serviceInstanceIDDetectorSync,
serviceInstanceIdDetectorSync,
],
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ import { noopDetectorSync } from '../../detectors/NoopDetectorSync';
/**
* @experimental
*/
export const serviceInstanceIDDetectorSync = noopDetectorSync;
export const serviceInstanceIdDetectorSync = noopDetectorSync;
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ export * from './HostDetectorSync';
export * from './OSDetectorSync';
export * from './ProcessDetector';
export * from './ProcessDetectorSync';
export * from './ServiceInstanceIDDetectorSync';
export * from './ServiceInstanceIdDetectorSync';
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import { ResourceDetectionConfig } from '../../config';
import { randomUUID } from 'crypto';

/**
* ServiceInstanceIDDetectorSync detects the resources related to the service instance ID.
* ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.
*/
class ServiceInstanceIDDetectorSync implements DetectorSync {
class ServiceInstanceIdDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): Resource {
const attributes: ResourceAttributes = {
[SEMRESATTRS_SERVICE_INSTANCE_ID]: randomUUID(),
Expand All @@ -36,5 +36,5 @@ class ServiceInstanceIDDetectorSync implements DetectorSync {
/**
* @experimental
*/
export const serviceInstanceIDDetectorSync =
new ServiceInstanceIDDetectorSync();
export const serviceInstanceIdDetectorSync =
new ServiceInstanceIdDetectorSync();
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ export * from './HostDetectorSync';
export * from './OSDetectorSync';
export * from './ProcessDetector';
export * from './ProcessDetectorSync';
export * from './ServiceInstanceIDDetectorSync';
export * from './ServiceInstanceIdDetectorSync';