Skip to content

Commit 49342d5

Browse files
authored
Merge branch 'main' into feature/hybrid-agent-metrics
2 parents 564eb6b + a6c2937 commit 49342d5

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.github/workflows/pr-title-checker-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": ""
44
},
55
"CHECKS": {
6-
"regexp": "^(fix|feat|security|notice|chore|ci|docs|test|summary)(\([^)]+\))?: "
6+
"regexp": "^(fix|feat|security|notice|chore|ci|docs|test|summary)(\\([^)]+\\))?: "
77
},
88
"MESSAGES": {
99
"success": "Pull request title is properly formatted.",

.github/workflows/pr_title_checker.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@ jobs:
2424
with:
2525
disable-sudo: true
2626
egress-policy: audit
27+
- name: Checkout
28+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
29+
with:
30+
fetch-depth: 0
2731
- name: Check PR title
2832
uses: thehanimo/pr-title-checker@7fbfe05602bdd86f926d3fb3bccb6f3aed43bc70 # v1.4.3
2933
with:
3034
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3135
pass_on_octokit_error: false
32-
configuration_path: .github/workflows/pr-title-checker-config.json
36+
local_configuration_path: .github/workflows/pr-title-checker-config.json

src/Agent/NewRelic/Agent/Core/OpenTelemetryBridge/ActivityBridgeSegmentHelpers.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ private static void ProcessRpcClientTags(ISegment segment, IAgent agent, IErrorS
145145
tags.TryGetAndRemoveTag<string>(["grpc.method"], out var grpcMethod);
146146

147147
tags.TryGetAndRemoveTag<string>(["server.address", "network.peer.address"], out var host);
148-
tags.TryGetAndRemoveTag<int>(["server.port", "network.peer.port"], out var port);
148+
tags.TryGetAndRemoveTag<int?>(["server.port", "network.peer.port"], out var port);
149149

150150
// TODO: Otel tracing spec says "component" should be set to the rpc system, but the grpc spec makes no mention of it.
151151
// TODO: ExternalSegmentData curently sets Component as an Intrinsic attribute on the span, with a value of _segmentData.TypeName (which ends up being `NewRelic.Agent.Core.OpenTelemetryBridge.ActivityBridge`) with no override available. So there's no way for us to set the same attribute with a different value.
152152
//segment.AddCustomAttribute("component", rpcSystem);
153153

154-
var path = BuildRpcPath(host, port, service, method, grpcMethod);
154+
var path = BuildRpcPath(host ?? "unknown", port ?? 0, service, method, grpcMethod);
155155
Uri uri = new Uri(path);
156156
var externalSegmentData = new ExternalSegmentData(uri, method);
157157

@@ -195,7 +195,7 @@ private static void ProcessRpcServerTags(ISegment segment, IAgent agent, IErrorS
195195

196196
var transaction = hybridAgentSegment.GetTransactionFromSegment();
197197

198-
var path = BuildRpcPath(host, port, service, method, grpcMethod);
198+
var path = BuildRpcPath(host ?? "unknown", port ?? 0, service, method, grpcMethod);
199199
transaction.SetUri(path);
200200

201201
transaction.SetRequestMethod(method ?? grpcMethod ?? "Unknown"); // TODO: should we default to "Unknown" or leave it null?

0 commit comments

Comments
 (0)