Skip to content

Commit

Permalink
refactor(web-common): add incubating semconv to package (#5446)
Browse files Browse the repository at this point in the history
  • Loading branch information
pichlermarc authored Feb 11, 2025
1 parent 4f91c1d commit 4fb9c5a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import { Context } from '@opentelemetry/api';
import { LogRecord, LogRecordProcessor } from '@opentelemetry/sdk-logs';
import { ATTR_SESSION_ID } from '@opentelemetry/semantic-conventions/incubating';
import { ATTR_SESSION_ID } from './semconv';
import { SessionProvider } from './types/SessionProvider';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
Span,
ReadableSpan,
} from '@opentelemetry/sdk-trace-base';
import { ATTR_SESSION_ID } from '@opentelemetry/semantic-conventions/incubating';
import { ATTR_SESSION_ID } from './semconv';
import { SessionProvider } from './types/SessionProvider';

/**
Expand Down
22 changes: 22 additions & 0 deletions experimental/packages/web-common/src/semconv.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* A unique id to identify a session.
*
* @example "00112233-4455-6677-8899-aabbccddeeff"
*/
export const ATTR_SESSION_ID = 'session.id' as const;

0 comments on commit 4fb9c5a

Please sign in to comment.