Skip to content
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

Propose semantic conventions for GCP client library identification #1047

Merged
merged 18 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
36aaf4c
Propose semantic conventions for GCP client library identification/at…
michaelsafyan May 17, 2024
0ec889d
Added changelog entry for the enhancement.
michaelsafyan May 17, 2024
f700981
Add pull request reference.
michaelsafyan May 17, 2024
589567c
Merge branch 'open-telemetry:main' into gcp-client-libraries
michaelsafyan May 20, 2024
bdb00c8
Merge branch 'open-telemetry:main' into gcp-client-libraries
michaelsafyan May 22, 2024
a974d53
Merge branch 'open-telemetry:main' into gcp-client-libraries
michaelsafyan May 24, 2024
042da91
Generalize the name for 'repo' and 'asset'.
michaelsafyan May 24, 2024
0fbdce0
Remove redundant prefix in the registry, fixing the attribute generat…
michaelsafyan May 24, 2024
2581647
Apply suggestion requested in pull request.
michaelsafyan May 28, 2024
437b3e4
Apply suggestion requested in pull request.
michaelsafyan May 28, 2024
19397df
Merge branch 'open-telemetry:main' into gcp-client-libraries
michaelsafyan May 29, 2024
d65aa65
Remove non-GCP attributes from the scope.
michaelsafyan May 29, 2024
b48c641
Regenerate the documentation.
michaelsafyan May 30, 2024
281a3af
Remove docs that were generated by files that have since been deleted.
michaelsafyan May 30, 2024
29fbf7b
Merge branch 'open-telemetry:main' into gcp-client-libraries
michaelsafyan Jun 4, 2024
4c3fb77
Apply requested changes in pull request 1047.
michaelsafyan Jun 4, 2024
bd6823f
Remove '.scope' from the ID given that it is no longer of scope type.
michaelsafyan Jun 4, 2024
bccab97
Merge branch 'main' into gcp-client-libraries
lmolkova Jun 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .chloggen/gcp-client-libraries.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
change_type: 'enhancement'
component: instrumentation, gcp
note: Introduced `gcp.client.service` and 'instrumentation.source.*' attributes.
issues: [ 1047 ]
1 change: 1 addition & 0 deletions docs/attributes-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Currently, the following namespaces exist:
- [Heroku](heroku.md)
- [Host](host.md)
- [HTTP](http.md)
- [Instrumentation](instrumentation.md)
- [iOS](ios.md)
- [JVM](jvm.md)
- [K8s](k8s.md)
Expand Down
19 changes: 19 additions & 0 deletions docs/attributes-registry/gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,28 @@

# GCP

- [Gcp](#gcp-attributes)
- [Gcp Client](#gcp-client-attributes)
- [Gcp Cloud Run](#gcp-cloud-run-attributes)
- [Gcp Gce](#gcp-gce-attributes)

## GCP Attributes

Attributes for Google Cloud

| Attribute | Type | Description | Examples | Stability |
| --------- | ---- | ----------- | -------- | --------- |

## GCP Client Attributes

Attributes for Google Cloud client libraries.

| Attribute | Type | Description | Examples | Stability |
| -------------------- | ------ | ------------------------------------------------------ | ----------------------------------------------------- | ---------------------------------------------------------------- |
| `gcp.client.service` | string | Identifies official Google Cloud client libraries. [1] | `appengine`; `run`; `firestore`; `alloydb`; `spanner` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** 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.
michaelsafyan marked this conversation as resolved.
Show resolved Hide resolved

## GCP Cloud Run Attributes

This document defines attributes for Google Cloud Run.
Expand Down
18 changes: 18 additions & 0 deletions docs/attributes-registry/instrumentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!--- Hugo front matter used to generate the website version of this page:
--->

<!-- NOTE: THIS FILE IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/attribute_namespace.md.j2 -->

# Instrumentation

## Instrumentation Attributes

Describes properties about the library that is being instrumented or that is responsible for performing the instrumentation.

| Attribute | Type | Description | Examples | Stability |
| ------------------------------- | ------ | -------------------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------------------- |
| `instrumentation.source.repo` | string | The repository associated with the InstrumentationScope. | `github.com/organization/repo`; `gitlab.com/group/repo` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `instrumentation.source.target` | string | The build target associated with the InstrumentationScope. [1] | `//in/bazel/path/to/my/folder:target`; `inGradleYourLib` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** 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.).
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: service
type: string
stability: experimental
brief: Identifies official Google Cloud client libraries.
michaelsafyan marked this conversation as resolved.
Show resolved Hide resolved
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.
michaelsafyan marked this conversation as resolved.
Show resolved Hide resolved
attributes:
- id: 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
michaelsafyan marked this conversation as resolved.
Show resolved Hide resolved
type: string
stability: experimental
brief: The repository associated with the InstrumentationScope.
michaelsafyan marked this conversation as resolved.
Show resolved Hide resolved
examples: [github.com/organization/repo, gitlab.com/group/repo]
michaelsafyan marked this conversation as resolved.
Show resolved Hide resolved
- id: source.target
michaelsafyan marked this conversation as resolved.
Show resolved Hide resolved
type: string
stability: experimental
brief: The build target associated with the InstrumentationScope.
michaelsafyan marked this conversation as resolved.
Show resolved Hide resolved
examples: ['//in/bazel/path/to/my/folder:target', 'inGradleYourLib']
michaelsafyan marked this conversation as resolved.
Show resolved Hide resolved
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.).
9 changes: 9 additions & 0 deletions model/trace/instrumentation/gcp-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
groups:
- id: gcp.client.scope
type: scope
michaelsafyan marked this conversation as resolved.
Show resolved Hide resolved
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
michaelsafyan marked this conversation as resolved.
Show resolved Hide resolved
- ref: instrumentation.source.target
requirement_level: opt_in
Loading