Skip to content

Commit

Permalink
Merge branch 'main' into add_k8s_network_metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrsMark authored Nov 20, 2024
2 parents cb5af8d + c5093dd commit 833d3f3
Show file tree
Hide file tree
Showing 50 changed files with 320 additions and 136 deletions.
22 changes: 22 additions & 0 deletions .chloggen/1574.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: gen-ai

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add 2 well-known gen-ai systems as reference values of the gen-ai system attribute including AWS Bedrock and IBM Watsonx AI

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [ 1574 ]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
17 changes: 17 additions & 0 deletions .chloggen/geo_fields.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: new_component

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: geo

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add geo fields to attribute registry.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [1033]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ body:
- area:file
- area:gcp
- area:gen-ai
- area:geo
- area:go
- area:graphql
- area:hardware
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/change_proposal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ body:
- area:file
- area:gcp
- area:gen-ai
- area:geo
- area:go
- area:graphql
- area:hardware
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/new-conventions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ body:
- area:file
- area:gcp
- area:gen-ai
- area:geo
- area:go
- area:graphql
- area:hardware
Expand Down
1 change: 1 addition & 0 deletions docs/attributes-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Currently, the following namespaces exist:
- [File](file.md)
- [GCP](gcp.md)
- [Gen AI](gen-ai.md)
- [Geo](geo.md)
- [Go](go.md)
- [GraphQL](graphql.md)
- [Hardware](hardware.md)
Expand Down
2 changes: 2 additions & 0 deletions docs/attributes-registry/gen-ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ If none of these options apply, the `gen_ai.system` SHOULD be set to `_OTHER`.
| Value | Description | Stability |
|---|---|---|
| `anthropic` | Anthropic | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.bedrock` | AWS Bedrock | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `az.ai.inference` | Azure AI Inference | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `cohere` | Cohere | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `ibm.watsonx.ai` | IBM Watsonx AI | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `openai` | OpenAI | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `vertex_ai` | Vertex AI | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

Expand Down
34 changes: 34 additions & 0 deletions docs/attributes-registry/geo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!--- 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 -->

# Geo

## Geo Attributes

Geo fields can carry data about a specific location related to an event. This geolocation information can be derived from techniques such as Geo IP, or be user-supplied.
Note: Geo attributes are typically used under another namespace, such as client.* and describe the location of the corresponding entity (device, end-user, etc). Semantic conventions that reference geo attributes (as a root namespace) or embed them (under their own namespace) SHOULD document what geo attributes describe in the scope of that convention.

| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| <a id="geo-continent-code" href="#geo-continent-code">`geo.continent.code`</a> | string | Two-letter code representing continent’s name. | `AF`; `AN`; `AS` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="geo-country-iso-code" href="#geo-country-iso-code">`geo.country.iso_code`</a> | string | Two-letter ISO Country Code ([ISO 3166-1 alpha2](https://en.wikipedia.org/wiki/ISO_3166-1#Codes)). | `CA` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="geo-locality-name" href="#geo-locality-name">`geo.locality.name`</a> | string | Locality name. Represents the name of a city, town, village, or similar populated place. | `Montreal`; `Berlin` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="geo-location-lat" href="#geo-location-lat">`geo.location.lat`</a> | double | Latitude of the geo location in [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System#WGS84). | `45.505918` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="geo-location-lon" href="#geo-location-lon">`geo.location.lon`</a> | double | Longitude of the geo location in [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System#WGS84). | `-73.61483` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="geo-postal-code" href="#geo-postal-code">`geo.postal_code`</a> | string | Postal code associated with the location. Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country. | `94040` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="geo-region-iso-code" href="#geo-region-iso-code">`geo.region.iso_code`</a> | string | Region ISO code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). | `CA-QC` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`geo.continent.code` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

| Value | Description | Stability |
|---|---|---|
| `AF` | Africa | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `AN` | Antarctica | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `AS` | Asia | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `EU` | Europe | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `NA` | North America | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `OC` | Oceania | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `SA` | South America | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
2 changes: 1 addition & 1 deletion docs/azure/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Describes Azure Resource Log event, see [Azure Resource Log Top-level Schema](ht
> [!Warning]
> This field contains sensitive (PII) information.
**[2]:** if the event is tied to an Active Directory tenant.
**[2] `tenant.id`:** if the event is tied to an Active Directory tenant.

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
Expand Down
12 changes: 6 additions & 6 deletions docs/database/cassandra.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ SHOULD NOT be captured.

This attribute has stability level RELEASE CANDIDATE.

**[2]:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query.
**[2] `db.collection.name`:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query.

**[3] `db.namespace`:** If a database system has multiple namespace components, they SHOULD be concatenated (potentially using database system specific conventions) from most general to most specific namespace component, and more specific namespaces SHOULD NOT be captured without the more general namespaces, to ensure that "startswith" queries for the more general namespaces will be valid.
Semantic conventions for individual database systems SHOULD document what `db.namespace` means in the context of that system.
Expand All @@ -80,21 +80,21 @@ system specific term if more applicable.

This attribute has stability level RELEASE CANDIDATE.

**[5]:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query.
**[5] `db.operation.name`:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query.

**[6] `db.response.status_code`:** The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system.
This attribute has stability level RELEASE CANDIDATE.

**[7]:** If the operation failed and status code is available.
**[7] `db.response.status_code`:** If the operation failed and status code is available.

**[8] `error.type`:** The `error.type` SHOULD match the `db.response.status_code` returned by the database or the client library, or the canonical name of exception that occurred.
When using canonical exception type name, instrumentation SHOULD do the best effort to report the most relevant type. For example, if the original exception is wrapped into a generic one, the original exception SHOULD be preferred.
Instrumentations SHOULD document how `error.type` is populated.

**[9] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.

**[10]:** If using a port other than the default port for this DBMS and if `server.address` is set.
**[10] `server.port`:** If using a port other than the default port for this DBMS and if `server.address` is set.

**[11] `db.operation.batch.size`:** Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` SHOULD never be `1`.
This attribute has stability level RELEASE CANDIDATE.
Expand All @@ -103,14 +103,14 @@ This attribute has stability level RELEASE CANDIDATE.
Summary may be available to the instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that support query parsing SHOULD generate a summary following [Generating query summary](../../docs/database/database-spans.md#generating-a-summary-of-the-quey-text) section.
This attribute has stability level RELEASE CANDIDATE.

**[13]:** if readily available or if instrumentation supports query summarization.
**[13] `db.query.summary`:** if readily available or if instrumentation supports query summarization.

**[14] `db.query.text`:** For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext).
For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable.
Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk.
This attribute has stability level RELEASE CANDIDATE.

**[15]:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext).
**[15] `db.query.text`:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext).
Parameterized query text SHOULD be collected by default (the query parameter values themselves are opt-in, see [`db.operation.parameter.<key>`](../../docs/attributes-registry/db.md)).

**[16] `network.peer.address`:** If a database operation involved multiple network calls (for example retries), the address of the last contacted node SHOULD be used.
Expand Down
Loading

0 comments on commit 833d3f3

Please sign in to comment.