@opentelemetry/instrumentation-grpc
Advanced tools
Comparing version 0.50.0 to 0.51.0
@@ -57,3 +57,3 @@ "use strict"; | ||
span.setStatus((0, utils_1._grpcStatusCodeToSpanStatus)(err.code)); | ||
span.setAttribute(semantic_conventions_1.SemanticAttributes.RPC_GRPC_STATUS_CODE, err.code); | ||
span.setAttribute(semantic_conventions_1.SEMATTRS_RPC_GRPC_STATUS_CODE, err.code); | ||
} | ||
@@ -66,3 +66,3 @@ span.setAttributes({ | ||
else { | ||
span.setAttribute(semantic_conventions_1.SemanticAttributes.RPC_GRPC_STATUS_CODE, status_code_1.GRPC_STATUS_CODE_OK); | ||
span.setAttribute(semantic_conventions_1.SEMATTRS_RPC_GRPC_STATUS_CODE, status_code_1.GRPC_STATUS_CODE_OK); | ||
} | ||
@@ -103,3 +103,3 @@ span.end(); | ||
[AttributeNames_1.AttributeNames.GRPC_ERROR_MESSAGE]: err.message, | ||
[semantic_conventions_1.SemanticAttributes.RPC_GRPC_STATUS_CODE]: err.code, | ||
[semantic_conventions_1.SEMATTRS_RPC_GRPC_STATUS_CODE]: err.code, | ||
}); | ||
@@ -113,3 +113,3 @@ endSpan(); | ||
span.setStatus((0, utils_1._grpcStatusCodeToSpanStatus)(status.code)); | ||
span.setAttribute(semantic_conventions_1.SemanticAttributes.RPC_GRPC_STATUS_CODE, status.code); | ||
span.setAttribute(semantic_conventions_1.SEMATTRS_RPC_GRPC_STATUS_CODE, status.code); | ||
endSpan(); | ||
@@ -116,0 +116,0 @@ }); |
@@ -6,3 +6,3 @@ import type { GrpcInstrumentationConfig } from './types'; | ||
constructor(config?: GrpcInstrumentationConfig); | ||
init(): InstrumentationNodeModuleDefinition<any>[]; | ||
init(): InstrumentationNodeModuleDefinition[]; | ||
/** | ||
@@ -9,0 +9,0 @@ * @internal |
@@ -34,4 +34,3 @@ "use strict"; | ||
return [ | ||
new instrumentation_1.InstrumentationNodeModuleDefinition('@grpc/grpc-js', ['1.*'], (moduleExports, version) => { | ||
this._diag.debug(`Applying patch for @grpc/grpc-js@${version}`); | ||
new instrumentation_1.InstrumentationNodeModuleDefinition('@grpc/grpc-js', ['1.*'], moduleExports => { | ||
if ((0, instrumentation_1.isWrapped)(moduleExports.Server.prototype.register)) { | ||
@@ -66,6 +65,5 @@ this._unwrap(moduleExports.Server.prototype, 'register'); | ||
return moduleExports; | ||
}, (moduleExports, version) => { | ||
}, moduleExports => { | ||
if (moduleExports === undefined) | ||
return; | ||
this._diag.debug(`Removing patch for @grpc/grpc-js@${version}`); | ||
this._unwrap(moduleExports.Server.prototype, 'register'); | ||
@@ -125,5 +123,5 @@ this._unwrap(moduleExports, 'makeClientConstructor'); | ||
.setAttributes({ | ||
[semantic_conventions_1.SemanticAttributes.RPC_SYSTEM]: AttributeValues_1.AttributeValues.RPC_SYSTEM, | ||
[semantic_conventions_1.SemanticAttributes.RPC_METHOD]: method, | ||
[semantic_conventions_1.SemanticAttributes.RPC_SERVICE]: service, | ||
[semantic_conventions_1.SEMATTRS_RPC_SYSTEM]: AttributeValues_1.AttributeValues.RPC_SYSTEM, | ||
[semantic_conventions_1.SEMATTRS_RPC_METHOD]: method, | ||
[semantic_conventions_1.SEMATTRS_RPC_SERVICE]: service, | ||
}); | ||
@@ -236,5 +234,5 @@ instrumentation._metadataCapture.server.captureRequestMetadata(span, call.metadata); | ||
.setAttributes({ | ||
[semantic_conventions_1.SemanticAttributes.RPC_SYSTEM]: 'grpc', | ||
[semantic_conventions_1.SemanticAttributes.RPC_METHOD]: method, | ||
[semantic_conventions_1.SemanticAttributes.RPC_SERVICE]: service, | ||
[semantic_conventions_1.SEMATTRS_RPC_SYSTEM]: 'grpc', | ||
[semantic_conventions_1.SEMATTRS_RPC_METHOD]: method, | ||
[semantic_conventions_1.SEMATTRS_RPC_SERVICE]: service, | ||
}); | ||
@@ -261,5 +259,5 @@ instrumentation.extractNetMetadata(this, span); | ||
.setAttributes({ | ||
[semantic_conventions_1.SemanticAttributes.RPC_SYSTEM]: 'grpc', | ||
[semantic_conventions_1.SemanticAttributes.RPC_METHOD]: methodAttributeValue, | ||
[semantic_conventions_1.SemanticAttributes.RPC_SERVICE]: service, | ||
[semantic_conventions_1.SEMATTRS_RPC_SYSTEM]: 'grpc', | ||
[semantic_conventions_1.SEMATTRS_RPC_METHOD]: methodAttributeValue, | ||
[semantic_conventions_1.SEMATTRS_RPC_SERVICE]: service, | ||
}); | ||
@@ -275,4 +273,4 @@ if (metadata != null) { | ||
if (parsedUri != null && parsedUri.groups != null) { | ||
span.setAttribute(semantic_conventions_1.SemanticAttributes.NET_PEER_NAME, parsedUri.groups['name']); | ||
span.setAttribute(semantic_conventions_1.SemanticAttributes.NET_PEER_PORT, parseInt(parsedUri.groups['port'])); | ||
span.setAttribute(semantic_conventions_1.SEMATTRS_NET_PEER_NAME, parsedUri.groups['name']); | ||
span.setAttribute(semantic_conventions_1.SEMATTRS_NET_PEER_PORT, parseInt(parsedUri.groups['port'])); | ||
} | ||
@@ -279,0 +277,0 @@ } |
@@ -48,3 +48,3 @@ "use strict"; | ||
}); | ||
span.setAttribute(semantic_conventions_1.SemanticAttributes.RPC_GRPC_STATUS_CODE, status_code_1.GRPC_STATUS_CODE_OK); | ||
span.setAttribute(semantic_conventions_1.SEMATTRS_RPC_GRPC_STATUS_CODE, status_code_1.GRPC_STATUS_CODE_OK); | ||
endSpan(); | ||
@@ -65,3 +65,3 @@ }); | ||
[AttributeNames_1.AttributeNames.GRPC_ERROR_MESSAGE]: err.message, | ||
[semantic_conventions_1.SemanticAttributes.RPC_GRPC_STATUS_CODE]: err.code, | ||
[semantic_conventions_1.SEMATTRS_RPC_GRPC_STATUS_CODE]: err.code, | ||
}); | ||
@@ -84,3 +84,3 @@ endSpan(); | ||
}); | ||
span.setAttribute(semantic_conventions_1.SemanticAttributes.RPC_GRPC_STATUS_CODE, err.code); | ||
span.setAttribute(semantic_conventions_1.SEMATTRS_RPC_GRPC_STATUS_CODE, err.code); | ||
} | ||
@@ -94,3 +94,3 @@ span.setAttributes({ | ||
span.setStatus({ code: api_1.SpanStatusCode.UNSET }); | ||
span.setAttribute(semantic_conventions_1.SemanticAttributes.RPC_GRPC_STATUS_CODE, status_code_1.GRPC_STATUS_CODE_OK); | ||
span.setAttribute(semantic_conventions_1.SEMATTRS_RPC_GRPC_STATUS_CODE, status_code_1.GRPC_STATUS_CODE_OK); | ||
} | ||
@@ -97,0 +97,0 @@ span.end(); |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.50.0"; | ||
export declare const VERSION = "0.51.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.50.0'; | ||
exports.VERSION = '0.51.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/instrumentation-grpc", | ||
"version": "0.50.0", | ||
"version": "0.51.0", | ||
"description": "OpenTelemetry grpc automatic instrumentation package.", | ||
@@ -53,6 +53,6 @@ "main": "build/src/index.js", | ||
"@opentelemetry/api": "1.8.0", | ||
"@opentelemetry/context-async-hooks": "1.23.0", | ||
"@opentelemetry/core": "1.23.0", | ||
"@opentelemetry/sdk-trace-base": "1.23.0", | ||
"@opentelemetry/sdk-trace-node": "1.23.0", | ||
"@opentelemetry/context-async-hooks": "1.24.0", | ||
"@opentelemetry/core": "1.24.0", | ||
"@opentelemetry/sdk-trace-base": "1.24.0", | ||
"@opentelemetry/sdk-trace-node": "1.24.0", | ||
"@protobuf-ts/grpc-transport": "2.9.3", | ||
@@ -79,8 +79,8 @@ "@protobuf-ts/runtime": "2.9.3", | ||
"dependencies": { | ||
"@opentelemetry/instrumentation": "0.50.0", | ||
"@opentelemetry/semantic-conventions": "1.23.0" | ||
"@opentelemetry/instrumentation": "0.51.0", | ||
"@opentelemetry/semantic-conventions": "1.24.0" | ||
}, | ||
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-grpc", | ||
"sideEffects": false, | ||
"gitHead": "5231aa255047fbc6ee3d6a299f4423ab2f8a5fbc" | ||
"gitHead": "3ab4f765d8d696327b7d139ae6a45e7bd7edd924" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
140170
1121
+ Added@opentelemetry/api-logs@0.51.0(transitive)
+ Added@opentelemetry/instrumentation@0.51.0(transitive)
+ Added@opentelemetry/semantic-conventions@1.24.0(transitive)
- Removed@opentelemetry/api-logs@0.50.0(transitive)
- Removed@opentelemetry/instrumentation@0.50.0(transitive)
- Removed@opentelemetry/semantic-conventions@1.23.0(transitive)