Skip to content

Commit

Permalink
Generalize the name for 'repo' and 'asset'.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsafyan committed May 24, 2024
1 parent a974d53 commit 042da91
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 44 deletions.
4 changes: 2 additions & 2 deletions .chloggen/gcp-client-libraries.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
change_type: 'enhancement'
component: gcp
note: Introduced `gcp.client.*` scope attributes to identify GCP client libraries.
component: instrumentation, gcp
note: Introduced `gcp.client.service` and 'instrumentation.source.*' attributes.
issues: [ 1047 ]
24 changes: 24 additions & 0 deletions model/registry/gcp.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
groups:
- id: registry.gcp
prefix: gcp
type: attribute_group
brief: Attributes for Google Cloud
- id: registry.gcp.client
prefix: gcp.client
type: attribute_group
brief: >
Attributes for Google Cloud client libraries.
attributes:
- id: gcp.client.service
type: string
stability: experimental
brief: Identifies official Google Cloud client libraries.
note: >
Intended to be a stable identifier for Google Cloud client libraries
that is uniform across implementation languages. The value should be
derived from the canonical service domain for the service; for
example, 'foo.googleapis.com' should result in a value of 'foo'.
This attribute should be accompanied by 'instrumentation.source.repo'
and/or 'instrumentation.source.target' when the combination of
'gcp.client.service' and 'telemetry.sdk.language' is insufficient
to uniquely identify the particular client library.
examples: ['appengine', 'run', 'firestore', 'alloydb', 'spanner']
- id: registry.gcp.cloud_run
prefix: gcp.cloud_run
type: attribute_group
Expand Down
24 changes: 24 additions & 0 deletions model/registry/instrumentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
groups:
- id: registry.instrumentation
prefix: instrumentation
type: attribute_group
brief: >
Describes properties about the library that is being instrumented or that
is responsible for performing the instrumentation.
attributes:
- id: instrumentation.source.repo

Check failure on line 9 in model/registry/instrumentation.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[indentation] wrong indentation: expected 2 but found 4
type: string
stability: experimental
brief: The repository associated with the InstrumentationScope.
examples: [github.com/organization/repo, gitlab.com/group/repo]
- id: instrumentation.source.target
type: string
stability: experimental
brief: The build target associated with the InstrumentationScope.
examples: ['//in/bazel/path/to/my/folder:target', 'inGradleYourLib']
note: >
Particularly useful if the InstrumentationScope library cannot be
triangulated from the name and `instrumenation.source.repo` alone.
If multiple build targets produce the same result, choose the
narrowest possible target (e.g. for Make: "mylib" rather than "all";
for Bazel: "//path/to/specific:target", not "//path/..."; etc.).
50 changes: 8 additions & 42 deletions model/trace/instrumentation/gcp-client.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,9 @@
groups:
- id: gcp.client.scope
type: scope
brief: >
The `gcp.client` conventions are intended to be used by Google Cloud
client libraries (e.g. https://github.com/googleapis/* and other
Google-owned/Google-provided client libraries for Google Cloud) to
identify such clients and to track their operations and performance.
prefix: gcp.client
stability: experimental
attributes:
- id: gcp.client.service
type: string
stability: experimental
requirement_level: required
brief: >
Short name of the GCP service for which the library is a client.
All variants of the client across programming languages should use an
identical value for this property. The short name should be intuitive
and aligned with either the name of the client (e.g. X for client
library packages named `google-cloud-X`) or the name of the API
subdomain (e.g. X for APIs hosted at `X.googleapis.com`).
examples: ['cloudsql', 'datastore', 'spanner', 'firestore']
- id: gcp.client.repo
type: string
stability: experimental
brief: >
Identifies the repository where the client library source comes from.
The prefix `github.com/` should be not be included in the name. If
(`gcp.client.service`, `telemetry.sdk.language`) do not uniquely
identify the client such as when multiple client variants exist
for the same service in a given programming language, this field
should be supplied in order to disambiguate between clients.
- id: gcp.client.artifact
type: string
stability: experimental
brief: >
Identifies the build target or deployment artifact within the
repository. In cases where multiple variants of the client exist
within the same repository, `gcp.client.repo` may not be sufficient
to disambiguate between client variants. For those cases, this
attribute may be used as an alternative approach to disambiguation.
- id: gcp.client.scope
type: scope
brief: Conventions for official Google Cloud client libraries.
prefix: gcp.client
stability: experimental
attributes:
- ref: gcp.client.service
requirement_level: opt_in
13 changes: 13 additions & 0 deletions model/trace/instrumentation/instrumentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
groups:
- id: instrumentation.scope
type: scope
brief: >
The `instrumentation` conventions are intended to provide common
mechanisms for triangulating and identifying instrumentation libraries.
prefix: instrumentation
stability: experimental
attributes:
- ref: instrumentation.source.repo
requirement_level: opt_in
- ref: instrumentation.source.target
requirement_level: opt_in

0 comments on commit 042da91

Please sign in to comment.