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.
feat: Introduce interfaces for metrics instrumentation #2403
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
feat: Introduce interfaces for metrics instrumentation #2403
Changes from all commits
2ae69f7
6671379
cd9f387
5eccd09
c2573b6
292beae
9cfd35e
4d19614
be5b7b3
527985f
56c9999
d249b66
145ad30
5c30048
57571b2
3e2a771
3f24049
09c7c7b
d1bf7bd
fed50c7
69e8a90
f771d7e
d714cf4
7977511
39d0c69
8ff9bb5
0efbeba
6171779
2678682
9e32b79
0483500
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blakeli0 I am now having some second thoughts on the
serviceName()
getter's name. I think there might be some slight discrepancy between the intended result and the function name.getServiceName()
returns the name that was configured in the default_host. For example, asset's will return cloudasset: https://github.com/googleapis/google-cloud-java/blob/9785f8cfd43db0a8968f086a1461242da9d16cb5/java-asset/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java#L866-L868even though the intended result for this probably should be
asset
.Not something blocking this PR, but just wondering your thoughts on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lqiu96 why should the intended name be
asset
?@blakeli0 Is there any way we could test this? that for a particular service, this is the intented serviceName ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to say what the intended name should be. I think it might be a bit weird for customers since we probably aren't providing consistent service names.
java-asset's serviceName is cloudasset (link above)
java-biglake's serviceName is biglake (https://github.com/googleapis/google-cloud-java/blob/458516b462e0a4494f32815fe9d0e6f0b30353f1/java-biglake/google-cloud-biglake/src/main/java/com/google/cloud/bigquery/biglake/v1/stub/MetastoreServiceStubSettings.java#L409-L411)
I think most services would have the service name of java-{serviceName} except for asset and possibly a few others.
It might not be a big concern after all, but something just doesn't sit right with me knowing that serviceName is parsed from a URI (default_host value) and not the package name or some config value (name_pretty or api name).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spent sometime while working on the dashboard on service names, and they are not of the type "java-{serviceName}". See column A in this sheet. In the dashboard too, we are deriving the service name from the default_host value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, your link doesn't work for me. Seems like there is no defined
serviceName
and we've somehow settled on the same definition 😆Not blocking this PR, but it would be great if there was an official definition for serviceName. Perhaps a question for the core team.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lqiu96 I think the term
serviceName
you introduced still makes sense, because we call the yaml and json config for each versioned protos service yaml and service config respectively. we may want to add more docs to explain that it is used for constructing service endpoints.@ddixit14 I would call
java-{serviceName}
a library name or repo name, as it could includes multiple versioned services or admin services.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, to wrap up the conversation above: I'll add some additional docs clarifying the intended use case (constructing the endpoint) and how the this value is constructed (from the config files).
It is fine that serviceName in the library (pulled from
getServiceName()
) doesn't 100% matchjava-{serviceName}
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. The library/repo name may not always be in the format of
java-{serviceName}
and I would not referjava-{serviceName}
as the format for library/repo name.