Skip to content

Commit

Permalink
refactor(instrumentation-grpc): clean up remnants of 'grpc' package i…
Browse files Browse the repository at this point in the history
…nstrumentation (#4420)

* refactor(instrumentation-grpc): clean up remnants of 'grpc' package instrumentation

* fix(changelog): add changelog entry
  • Loading branch information
pichlermarc committed Jan 31, 2024
1 parent efa6307 commit 2df6310
Show file tree
Hide file tree
Showing 9 changed files with 623 additions and 716 deletions.
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

0 comments on commit 2df6310

Please sign in to comment.