Skip to content

Commit 66a4ebe

Browse files
authored
Merge branch 'main' into retry2
2 parents 838d7d9 + 77a09e7 commit 66a4ebe

File tree

23 files changed

+846
-152
lines changed

23 files changed

+846
-152
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
([#4553](https://github.com/open-telemetry/opentelemetry-python/pull/4553))
1818
- docs: updated and added to the metrics and log examples
1919
([#4559](https://github.com/open-telemetry/opentelemetry-python/pull/4559))
20+
- Bump semantic conventions to 1.33.0
21+
([#4567](https://github.com/open-telemetry/opentelemetry-python/pull/4567))
2022

2123
## Version 1.32.0/0.53b0 (2025-04-10)
2224

opentelemetry-api/src/opentelemetry/_logs/_internal/__init__.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -162,29 +162,30 @@ def get_logger(
162162
) -> Logger:
163163
"""Returns a `Logger` for use by the given instrumentation library.
164164
165-
For any two calls it is undefined whether the same or different
166-
`Logger` instances are returned, even for different library names.
165+
For any two calls with identical parameters, it is undefined whether the same
166+
or different `Logger` instances are returned.
167167
168168
This function may return different `Logger` types (e.g. a no-op logger
169169
vs. a functional logger).
170170
171171
Args:
172-
name: The name of the instrumenting module.
173-
``__name__`` may not be used as this can result in
174-
different logger names if the loggers are in different files.
175-
It is better to use a fixed string that can be imported where
176-
needed and used consistently as the name of the logger.
177-
178-
This should *not* be the name of the module that is
179-
instrumented but the name of the module doing the instrumentation.
172+
name: The name of the instrumenting module, package or class.
173+
This should *not* be the name of the module, package or class that is
174+
instrumented but the name of the code doing the instrumentation.
180175
E.g., instead of ``"requests"``, use
181176
``"opentelemetry.instrumentation.requests"``.
182177
178+
For log sources which define a logger name (e.g. logging.Logger.name)
179+
the Logger Name should be recorded as the instrumentation scope name.
180+
183181
version: Optional. The version string of the
184182
instrumenting library. Usually this should be the same as
185183
``importlib.metadata.version(instrumenting_library_name)``.
186184
187185
schema_url: Optional. Specifies the Schema URL of the emitted telemetry.
186+
187+
attributes: Optional. Specifies the instrumentation scope attributes to
188+
associate with emitted telemetry.
188189
"""
189190

190191

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/app_attributes.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,25 @@
3535
3636
More information about Android identifier best practices can be found [here](https://developer.android.com/training/articles/user-data-ids).
3737
"""
38+
39+
APP_SCREEN_COORDINATE_X: Final = "app.screen.coordinate.x"
40+
"""
41+
The x (horizontal) coordinate of a screen coordinate, in screen pixels.
42+
"""
43+
44+
APP_SCREEN_COORDINATE_Y: Final = "app.screen.coordinate.y"
45+
"""
46+
The y (vertical) component of a screen coordinate, in screen pixels.
47+
"""
48+
49+
APP_WIDGET_ID: Final = "app.widget.id"
50+
"""
51+
An identifier that uniquely differentiates this widget from other widgets in the same application.
52+
Note: A widget is an application component, typically an on-screen visual GUI element.
53+
"""
54+
55+
APP_WIDGET_NAME: Final = "app.widget.name"
56+
"""
57+
The name of an application widget.
58+
Note: A widget is an application component, typically an on-screen visual GUI element.
59+
"""

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/cicd_attributes.py

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
from enum import Enum
1616
from typing import Final
1717

18+
CICD_PIPELINE_ACTION_NAME: Final = "cicd.pipeline.action.name"
19+
"""
20+
The kind of action a pipeline run is performing.
21+
"""
22+
1823
CICD_PIPELINE_NAME: Final = "cicd.pipeline.name"
1924
"""
2025
The human readable name of the pipeline within a CI/CD system.
@@ -50,6 +55,11 @@
5055
The unique identifier of a task run within a pipeline.
5156
"""
5257

58+
CICD_PIPELINE_TASK_RUN_RESULT: Final = "cicd.pipeline.task.run.result"
59+
"""
60+
The result of a task run.
61+
"""
62+
5363
CICD_PIPELINE_TASK_RUN_URL_FULL: Final = "cicd.pipeline.task.run.url.full"
5464
"""
5565
The [URL](https://wikipedia.org/wiki/URL) of the pipeline task run, providing the complete address in order to locate and identify the pipeline task run.
@@ -65,11 +75,35 @@
6575
The name of a component of the CICD system.
6676
"""
6777

78+
CICD_WORKER_ID: Final = "cicd.worker.id"
79+
"""
80+
The unique identifier of a worker within a CICD system.
81+
"""
82+
83+
CICD_WORKER_NAME: Final = "cicd.worker.name"
84+
"""
85+
The name of a worker within a CICD system.
86+
"""
87+
6888
CICD_WORKER_STATE: Final = "cicd.worker.state"
6989
"""
7090
The state of a CICD worker / agent.
7191
"""
7292

93+
CICD_WORKER_URL_FULL: Final = "cicd.worker.url.full"
94+
"""
95+
The [URL](https://wikipedia.org/wiki/URL) of the worker, providing the complete address in order to locate and identify the worker.
96+
"""
97+
98+
99+
class CicdPipelineActionNameValues(Enum):
100+
BUILD = "BUILD"
101+
"""The pipeline run is executing a build."""
102+
RUN = "RUN"
103+
"""The pipeline run is executing."""
104+
SYNC = "SYNC"
105+
"""The pipeline run is executing a sync."""
106+
73107

74108
class CicdPipelineResultValues(Enum):
75109
SUCCESS = "success"
@@ -95,6 +129,21 @@ class CicdPipelineRunStateValues(Enum):
95129
"""The finalizing state spans from when the run has finished executing (eg. cleanup of run resources)."""
96130

97131

132+
class CicdPipelineTaskRunResultValues(Enum):
133+
SUCCESS = "success"
134+
"""The task run finished successfully."""
135+
FAILURE = "failure"
136+
"""The task run did not finish successfully, eg. due to a compile error or a failing test. Such failures are usually detected by non-zero exit codes of the tools executed in the task run."""
137+
ERROR = "error"
138+
"""The task run failed due to an error in the CICD system, eg. due to the worker being killed."""
139+
TIMEOUT = "timeout"
140+
"""A timeout caused the task run to be interrupted."""
141+
CANCELLATION = "cancellation"
142+
"""The task run was cancelled, eg. by a user manually cancelling the task run."""
143+
SKIP = "skip"
144+
"""The task run was skipped, eg. due to a precondition not being met."""
145+
146+
98147
class CicdPipelineTaskTypeValues(Enum):
99148
BUILD = "build"
100149
"""build."""

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/code_attributes.py

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121

2222
CODE_COLUMN_NUMBER: Final = "code.column.number"
2323
"""
24-
The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`.
24+
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.code_attributes.CODE_COLUMN_NUMBER`.
2525
"""
2626

2727
CODE_FILE_PATH: Final = "code.file.path"
2828
"""
29-
The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).
29+
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.code_attributes.CODE_FILE_PATH`.
3030
"""
3131

3232
CODE_FILEPATH: Final = "code.filepath"
@@ -41,27 +41,12 @@
4141

4242
CODE_FUNCTION_NAME: Final = "code.function.name"
4343
"""
44-
The method or function fully-qualified name without arguments. The value should fit the natural representation of the language runtime, which is also likely the same used within `code.stacktrace` attribute value.
45-
Note: Values and format depends on each language runtime, thus it is impossible to provide an exhaustive list of examples.
46-
The values are usually the same (or prefixes of) the ones found in native stack trace representation stored in
47-
`code.stacktrace` without information on arguments.
48-
49-
Examples:
50-
51-
* Java method: `com.example.MyHttpService.serveRequest`
52-
* Java anonymous class method: `com.mycompany.Main$1.myMethod`
53-
* Java lambda method: `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod`
54-
* PHP function: `GuzzleHttp\\Client::transfer`
55-
* Go function: `github.com/my/repo/pkg.foo.func5`
56-
* Elixir: `OpenTelemetry.Ctx.new`
57-
* Erlang: `opentelemetry_ctx:new`
58-
* Rust: `playground::my_module::my_cool_func`
59-
* C function: `fopen`.
44+
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.code_attributes.CODE_FUNCTION_NAME`.
6045
"""
6146

6247
CODE_LINE_NUMBER: Final = "code.line.number"
6348
"""
64-
The line number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`.
49+
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.code_attributes.CODE_LINE_NUMBER`.
6550
"""
6651

6752
CODE_LINENO: Final = "code.lineno"
@@ -76,5 +61,5 @@
7661

7762
CODE_STACKTRACE: Final = "code.stacktrace"
7863
"""
79-
A stacktrace as a string in the natural representation for the language runtime. The representation is identical to [`exception.stacktrace`](/docs/exceptions/exceptions-spans.md#stacktrace-representation).
64+
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.code_attributes.CODE_STACKTRACE`.
8065
"""

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/container_attributes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
CONTAINER_LABEL_TEMPLATE: Final = "container.label"
8383
"""
8484
Container labels, `<key>` being the label name, the value being the label value.
85+
Note: For example, a docker container label `app` with value `nginx` SHOULD be recorded as the `container.label.app` attribute with value `"nginx"`.
8586
"""
8687

8788
CONTAINER_LABELS_TEMPLATE: Final = "container.labels"

0 commit comments

Comments
 (0)