Skip to content

Commit f34c324

Browse files
authored
Merge pull request #1251 from typelevel/update/opentelemetry-semconv-1.41.1
Update opentelemetry-semconv to 1.42.0
2 parents 5eeeda0 + 0c971b4 commit f34c324

35 files changed

Lines changed: 1692 additions & 238 deletions

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ val OpenTelemetryVersion = "1.63.0"
7979
val OpenTelemetryAlphaVersion = s"$OpenTelemetryVersion-alpha"
8080
val OpenTelemetryInstrumentationVersion = "2.29.0"
8181
val OpenTelemetryInstrumentationAlphaVersion = s"$OpenTelemetryInstrumentationVersion-alpha"
82-
val OpenTelemetrySemConvVersion = "1.41.0"
82+
val OpenTelemetrySemConvVersion = "1.42.0"
8383
val OpenTelemetrySemConvAlphaVersion = s"$OpenTelemetrySemConvVersion-alpha"
8484
val Otel4sAgentVersion = "2.22.0"
8585
val PekkoStreamVersion = "1.6.0"

buildscripts/semantic-convention/templates/registry/otel4s/attributes/weaver.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ comment_formats:
1313
old_style_paragraph: true
1414
omit_closing_li: true
1515
inline_code_snippet: "`{{code}}`"
16-
block_code_snippet: "{{{\n{{code}}\n}}}"
16+
block_code_snippet: "\n```\n{{code}}\n```\n"
1717
trim: true
1818
remove_trailing_dots: false
1919
default_comment_format: scaladoc

buildscripts/semantic-convention/templates/registry/otel4s/metrics/SemanticMetrics.scala.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ object {{ object_name }} {
164164
{% for metric in ctx.metrics | rejectattr("metric_name", "in", params.excluded_metrics) | sort(attribute='metric_name') %}
165165
{{ [metric.brief, concat_if("\n\n@note\n\n", metric.note)] | comment(indent=2) | replace('$', "$$") }}
166166
{%- if metric is deprecated %}
167-
@deprecated("{{ metric.deprecated.note }}", "")
167+
@deprecated("{{ metric.deprecated.note | trim }}", "")
168168
{%- elif params.stable_only == false and metric is stable %}
169169
@deprecated("Use stable `{{ stableRef(metric) }}` instead.", "")
170170
{%- endif %}
@@ -185,7 +185,7 @@ object {{ object_name }} {
185185
{% for attribute in metric_attributes | sort(attribute='name') %}
186186
{{ [attribute.brief, concat_if("\n\n@note\n\n", attribute.note)] | comment(indent=6) | replace('$', "$$")}}
187187
{%- if attribute is deprecated %}
188-
@deprecated("{{ attribute.deprecated.note }}", "")
188+
@deprecated("{{ attribute.deprecated.note | trim }}", "")
189189
{%- endif %}
190190
val {{ attribute.name | camel_case }}: AttributeSpec[{{to_scala_key_type(attribute)}}] =
191191
AttributeSpec(

semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/AndroidExperimentalAttributes.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ object AndroidExperimentalAttributes {
2525
*
2626
* @note
2727
* <p> The Android lifecycle states are defined in <a
28-
* href="https://developer.android.com/guide/components/activities/activity-lifecycle#lc">Activity lifecycle
29-
* callbacks</a>, and from which the `OS identifiers` are derived.
28+
* href="https://developer.android.com/guide/components/activities/activity-lifecycle#lifecycle-callbacks">Activity
29+
* lifecycle callbacks</a>, and from which the `OS identifiers` are derived.
3030
*/
3131
val AndroidAppState: AttributeKey[String] =
3232
AttributeKey("android.app.state")

semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/AppExperimentalAttributes.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,17 @@ object AppExperimentalAttributes {
2626
val AppBuildId: AttributeKey[String] =
2727
AttributeKey("app.build_id")
2828

29+
/** A unique identifier representing an instance of an end-user facing app crash.
30+
*
31+
* @note
32+
* <p> Its value MAY be meaningful and be used as a reference for telemetry and metadata recorded by the same
33+
* instrumentation (e.g. it is an ID generated by an external source that captured the crash). It MAY come from a
34+
* source external to the instrumentation such that it can be used to look up additional data from other sources as
35+
* well as facilitate deduplication.
36+
*/
37+
val AppCrashId: AttributeKey[String] =
38+
AttributeKey("app.crash.id")
39+
2940
/** A unique identifier representing the installation of an application on a specific device
3041
*
3142
* @note

semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/BrowserExperimentalAttributes.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ object BrowserExperimentalAttributes {
3030
val BrowserBrands: AttributeKey[Seq[String]] =
3131
AttributeKey("browser.brands")
3232

33+
/** Absolute URL of the current browser document according to <a
34+
* href="https://www.rfc-editor.org/rfc/rfc3986">RFC3986</a>.
35+
*/
36+
val BrowserDocumentUrlFull: AttributeKey[String] =
37+
AttributeKey("browser.document.url.full")
38+
3339
/** Preferred language of the user using the browser
3440
*
3541
* @note

semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/CicdExperimentalAttributes.scala

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,22 +85,22 @@ object CicdExperimentalAttributes {
8585
val CicdPipelineTaskType: AttributeKey[String] =
8686
AttributeKey("cicd.pipeline.task.type")
8787

88-
/** The name of a component of the CICD system.
88+
/** The name of a component of the CI/CD system.
8989
*/
9090
val CicdSystemComponent: AttributeKey[String] =
9191
AttributeKey("cicd.system.component")
9292

93-
/** The unique identifier of a worker within a CICD system.
93+
/** The unique identifier of a worker within a CI/CD system.
9494
*/
9595
val CicdWorkerId: AttributeKey[String] =
9696
AttributeKey("cicd.worker.id")
9797

98-
/** The name of a worker within a CICD system.
98+
/** The name of a worker within a CI/CD system.
9999
*/
100100
val CicdWorkerName: AttributeKey[String] =
101101
AttributeKey("cicd.worker.name")
102102

103-
/** The state of a CICD worker / agent.
103+
/** The state of a CI/CD worker / agent.
104104
*/
105105
val CicdWorkerState: AttributeKey[String] =
106106
AttributeKey("cicd.worker.state")
@@ -145,7 +145,7 @@ object CicdExperimentalAttributes {
145145
*/
146146
case object Failure extends CicdPipelineResultValue("failure")
147147

148-
/** The pipeline run failed due to an error in the CICD system, eg. due to the worker being killed.
148+
/** The pipeline run failed due to an error in the CI/CD system, eg. due to the worker being killed.
149149
*/
150150
case object Error extends CicdPipelineResultValue("error")
151151

@@ -198,7 +198,7 @@ object CicdExperimentalAttributes {
198198
*/
199199
case object Failure extends CicdPipelineTaskRunResultValue("failure")
200200

201-
/** The task run failed due to an error in the CICD system, eg. due to the worker being killed.
201+
/** The task run failed due to an error in the CI/CD system, eg. due to the worker being killed.
202202
*/
203203
case object Error extends CicdPipelineTaskRunResultValue("error")
204204

@@ -240,16 +240,16 @@ object CicdExperimentalAttributes {
240240
object CicdWorkerStateValue {
241241
implicit val attributeFromCicdWorkerStateValue: Attribute.From[CicdWorkerStateValue, String] = _.value
242242

243-
/** The worker is not performing work for the CICD system. It is available to the CICD system to perform work on
243+
/** The worker is not performing work for the CI/CD system. It is available to the CI/CD system to perform work on
244244
* (online / idle).
245245
*/
246246
case object Available extends CicdWorkerStateValue("available")
247247

248-
/** The worker is performing work for the CICD system.
248+
/** The worker is performing work for the CI/CD system.
249249
*/
250250
case object Busy extends CicdWorkerStateValue("busy")
251251

252-
/** The worker is not available to the CICD system (disconnected / down).
252+
/** The worker is not available to the CI/CD system (disconnected / down).
253253
*/
254254
case object Offline extends CicdWorkerStateValue("offline")
255255
}

semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/ContainerExperimentalAttributes.scala

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ object ContainerExperimentalAttributes {
7070
* href="https://docs.docker.com/engine/containers/run/#container-identification">identify Docker containers</a>. The
7171
* UUID might be abbreviated.
7272
*/
73+
@deprecated(
74+
"use `org.typelevel.otel4s.semconv.attributes.ContainerAttributes.ContainerId` instead.",
75+
""
76+
)
7377
val ContainerId: AttributeKey[String] =
7478
AttributeKey("container.id")
7579

@@ -89,6 +93,10 @@ object ContainerExperimentalAttributes {
8993

9094
/** Name of the image the container was built on.
9195
*/
96+
@deprecated(
97+
"use `org.typelevel.otel4s.semconv.attributes.ContainerAttributes.ContainerImageName` instead.",
98+
""
99+
)
92100
val ContainerImageName: AttributeKey[String] =
93101
AttributeKey("container.image.name")
94102

@@ -101,6 +109,10 @@ object ContainerExperimentalAttributes {
101109
* href="https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238">CRI</a>
102110
* report those under the `RepoDigests` field.
103111
*/
112+
@deprecated(
113+
"use `org.typelevel.otel4s.semconv.attributes.ContainerAttributes.ContainerImageRepoDigests` instead.",
114+
""
115+
)
104116
val ContainerImageRepoDigests: AttributeKey[Seq[String]] =
105117
AttributeKey("container.image.repo_digests")
106118

@@ -109,6 +121,10 @@ object ContainerExperimentalAttributes {
109121
* Inspect</a>. Should be only the `<tag>` section of the full name for example from
110122
* `registry.example.com/my-org/my-image:<tag>`.
111123
*/
124+
@deprecated(
125+
"use `org.typelevel.otel4s.semconv.attributes.ContainerAttributes.ContainerImageTags` instead.",
126+
""
127+
)
112128
val ContainerImageTags: AttributeKey[Seq[String]] =
113129
AttributeKey("container.image.tags")
114130

semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/CpuExperimentalAttributes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ object CpuExperimentalAttributes {
6565
*/
6666
case object Steal extends CpuModeValue("steal")
6767

68-
/** Kernel
68+
/** Deprecated. Use `system` instead.
6969
*/
7070
case object Kernel extends CpuModeValue("kernel")
7171
}

semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/FileExperimentalAttributes.scala

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,24 @@ object FileExperimentalAttributes {
9999
val FileInode: AttributeKey[String] =
100100
AttributeKey("file.inode")
101101

102+
/** The lock mechanism such as noted by <a
103+
* href="https://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html">POSIX</a>
104+
*/
105+
val FileLockMechanism: AttributeKey[String] =
106+
AttributeKey("file.lock.mechanism")
107+
108+
/** Mode of lock or operation such as documented by <a
109+
* href="https://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html">POSIX</a>
110+
*/
111+
val FileLockMode: AttributeKey[String] =
112+
AttributeKey("file.lock.mode")
113+
114+
/** The lock type as represented by i.e. <a
115+
* href="https://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html">POSIX</a>'s l_type.
116+
*/
117+
val FileLockType: AttributeKey[String] =
118+
AttributeKey("file.lock.type")
119+
102120
/** Mode of the file in octal representation.
103121
*/
104122
val FileMode: AttributeKey[String] =
@@ -142,4 +160,19 @@ object FileExperimentalAttributes {
142160
val FileSymbolicLinkTargetPath: AttributeKey[String] =
143161
AttributeKey("file.symbolic_link.target_path")
144162

163+
/** Values for [[FileLockType]].
164+
*/
165+
abstract class FileLockTypeValue(val value: String)
166+
object FileLockTypeValue {
167+
implicit val attributeFromFileLockTypeValue: Attribute.From[FileLockTypeValue, String] = _.value
168+
169+
/** read.
170+
*/
171+
case object Read extends FileLockTypeValue("read")
172+
173+
/** write.
174+
*/
175+
case object Write extends FileLockTypeValue("write")
176+
}
177+
145178
}

0 commit comments

Comments
 (0)