-
Notifications
You must be signed in to change notification settings - Fork 1k
Response/Request Size GRPC Metrics Instrumentation #14342
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
Open
asweet-confluent
wants to merge
41
commits into
open-telemetry:main
Choose a base branch
from
asweet-confluent:grpc-req-res-size
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 22 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
4516222
grpc support request/response size
crossoverJie e8f6b0e
fix ci
crossoverJie 01a1bb0
fix ci
crossoverJie 6121b30
fix ci
crossoverJie 9680219
fix test
crossoverJie cce97f1
fix ci
crossoverJie 22a791f
fix muzzle
crossoverJie c5c46dd
fix muzzle
crossoverJie d17a36c
fix muzzle
crossoverJie 9f6055d
fix ci
crossoverJie b9f6cee
fix ci
crossoverJie fcc4468
fix ci
crossoverJie 6dc7346
revert ci
crossoverJie 9b350b4
revert ci
crossoverJie 69ee2bd
fix muzzle
crossoverJie a10ffca
fix muzzle
crossoverJie e45c225
fix muzzle
crossoverJie bfe9087
fix muzzle
crossoverJie 43054ad
use static import asList
crossoverJie 1438a0a
fix with cr
crossoverJie 063160f
remove client&server prefix.
crossoverJie d16cccf
fix tests
asweet-confluent 4387287
Fix tests
asweet-confluent 3cbfa5a
Merge branch 'main' into grpc-req-res-size
asweet-confluent 484f0e8
Remove newlines
asweet-confluent d89492f
Merge remote-tracking branch 'origin/main' into grpc-req-res-size
asweet-confluent c88ae14
Remove message size trace attributes
asweet-confluent bc2abb0
./gradlew spotlessApply
otelbot[bot] 337ea9d
Fix metrics tests
asweet-confluent b37fd07
./gradlew spotlessApply
otelbot[bot] cac3159
PR feedback
asweet-confluent f168f5f
PR feedback
asweet-confluent eb617be
fix failing test
laurit e1ec0f3
Merge branch 'main' into grpc-req-res-size
laurit 4d63ab1
Merge branch 'main' into grpc-req-res-size
laurit 2b966ec
Merge branch 'main' into grpc-req-res-size
laurit fef2b4f
Rpc size metrics
laurit 0e0e2e1
fix latest dep test
laurit db98e02
use reflection to read the message size
laurit 8a7ef80
Merge branch 'main' into grpc-req-res-size
laurit 5db036f
revert change
laurit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
docs/apidiffs/current_vs_latest/opentelemetry-instrumentation-annotations.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Comparing source compatibility of opentelemetry-instrumentation-annotations-2.19.0-SNAPSHOT.jar against opentelemetry-instrumentation-annotations-2.18.1.jar | ||
No changes. | ||
No changes. |
2 changes: 1 addition & 1 deletion
2
docs/apidiffs/current_vs_latest/opentelemetry-instrumentation-api.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Comparing source compatibility of opentelemetry-instrumentation-api-2.19.0-SNAPSHOT.jar against opentelemetry-instrumentation-api-2.18.1.jar | ||
No changes. | ||
No changes. |
2 changes: 1 addition & 1 deletion
2
docs/apidiffs/current_vs_latest/opentelemetry-spring-boot-autoconfigure.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Comparing source compatibility of opentelemetry-spring-boot-autoconfigure-2.19.0-SNAPSHOT.jar against opentelemetry-spring-boot-autoconfigure-2.18.1.jar | ||
No changes. | ||
No changes. |
2 changes: 1 addition & 1 deletion
2
docs/apidiffs/current_vs_latest/opentelemetry-spring-boot-starter.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Comparing source compatibility of opentelemetry-spring-boot-starter-2.19.0-SNAPSHOT.jar against opentelemetry-spring-boot-starter-2.18.1.jar | ||
No changes. | ||
No changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...va/io/opentelemetry/instrumentation/api/incubator/semconv/rpc/RpcMessageBodySizeUtil.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.instrumentation.api.incubator.semconv.rpc; | ||
|
||
import io.opentelemetry.api.common.AttributeKey; | ||
import io.opentelemetry.api.common.Attributes; | ||
import javax.annotation.Nullable; | ||
|
||
final class RpcMessageBodySizeUtil { | ||
|
||
@Nullable | ||
static Long getRpcRequestBodySize(Attributes... attributesList) { | ||
return getAttribute(RpcCommonAttributesExtractor.RPC_REQUEST_BODY_SIZE, attributesList); | ||
} | ||
|
||
@Nullable | ||
static Long getRpcResponseBodySize(Attributes... attributesList) { | ||
return getAttribute(RpcCommonAttributesExtractor.RPC_RESPONSE_BODY_SIZE, attributesList); | ||
} | ||
|
||
@Nullable | ||
private static <T> T getAttribute(AttributeKey<T> key, Attributes... attributesList) { | ||
for (Attributes attributes : attributesList) { | ||
T value = attributes.get(key); | ||
if (value != null) { | ||
return value; | ||
} | ||
} | ||
return null; | ||
} | ||
|
||
private RpcMessageBodySizeUtil() {} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.