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(instrumentation-grpc): clean up remnants of 'grpc' package instrumentation #4420

2 changes: 2 additions & 0 deletions experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ All notable changes to experimental packages in this project will be documented

### :house: (Internal)

* refactor(instrumentation-grpc): clean up remnants of 'grpc' package instrumentation [#4420](https://github.com/open-telemetry/opentelemetry-js/pull/4420) @pichlermarc

## 0.48.0

### :boom: Breaking Change
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,30 @@ import type { EventEmitter } from 'events';
import type { Span, SpanStatus } from '@opentelemetry/api';
import type { Client, Metadata, ServiceError } from '@grpc/grpc-js';
import type * as grpcJs from '@grpc/grpc-js';
import type { GrpcJsInstrumentation } from './';
import type { GrpcClientFunc, SendUnaryDataCallback } from './types';
import type { metadataCaptureType } from '../internal-types';
import type { GrpcInstrumentation } from './';
import type {
GrpcClientFunc,
SendUnaryDataCallback,
metadataCaptureType,
} from './internal-types';

import { propagation, context } from '@opentelemetry/api';
import { SemanticAttributes } from '@opentelemetry/semantic-conventions';
import { AttributeNames } from '../enums/AttributeNames';
import { GRPC_STATUS_CODE_OK } from '../status-code';
import { AttributeNames } from './enums/AttributeNames';
import { GRPC_STATUS_CODE_OK } from './status-code';
import {
_grpcStatusCodeToSpanStatus,
_grpcStatusCodeToOpenTelemetryStatusCode,
_methodIsIgnored,
} from '../utils';
} from './utils';
import { errorMonitor } from 'events';

/**
* Parse a package method list and return a list of methods to patch
* with both possible casings e.g. "TestMethod" & "testMethod"
*/
export function getMethodsToWrap(
this: GrpcJsInstrumentation,
this: GrpcInstrumentation,
client: typeof Client,
methods: { [key: string]: { originalName?: string } }
): string[] {
Expand Down
Loading