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

refactor(net): remove hardcoded values, use semantic conventions #414

Merged
merged 3 commits into from
Apr 8, 2021
Merged
Changes from all 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
7 changes: 3 additions & 4 deletions plugins/node/opentelemetry-instrumentation-net/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
*/

import { NormalizedOptions } from './types';
import { GeneralAttribute } from '@opentelemetry/semantic-conventions';
import { platform } from 'os';

// @TODO Can be replaced with constants from the semantic conventions package once released.
export const IPC_PIPE = 'pipe';
export const IPC_UNIX = 'Unix';
export const IPC_TRANSPORT = platform() === 'win32' ? IPC_PIPE : IPC_UNIX;
export const IPC_TRANSPORT =
platform() === 'win32' ? GeneralAttribute.PIPE : GeneralAttribute.UNIX;

export function getNormalizedArgs(
args: unknown[]
Expand Down