Skip to content

Commit

Permalink
Generate semantic conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
iRevive committed Oct 16, 2024
1 parent 83d1660 commit 30fb9fd
Show file tree
Hide file tree
Showing 31 changed files with 1,996 additions and 100 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
params:
excluded_namespaces: ["ios", "aspnetcore", "signalr"]
excluded_namespaces: ["ios", "aspnetcore", "signalr", "dotnet"]
excluded_stability: ["experimental", "deprecated"] # stable - ["experimental", "deprecated"]; experimental - []
excluded_attributes: ["messaging.client_id"]
object_prefix: "" # stable - "", experimental - "Experimental"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
params:
excluded_namespaces: ["ios", "aspnetcore", "signalr", "kestrel", "veightjs", "go"]
excluded_namespaces: ["ios", "aspnetcore", "signalr", "kestrel", "veightjs", "go", "dotnet"]
excluded_attributes: ["messaging.client_id"]
excluded_stability: ["experimental", "deprecated"] # stable - ["experimental", "deprecated"]; experimental - []
object_prefix: "" # stable - "", experimental - "Experimental"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
params:
excluded_namespaces: ["ios", "aspnetcore", "signalr", "kestrel", "veightjs", "go"]
excluded_namespaces: ["ios", "aspnetcore", "signalr", "kestrel", "veightjs", "go", "dotnet"]
excluded_attributes: ["messaging.client_id"]
excluded_stability: ["experimental", "deprecated"] # stable - ["experimental", "deprecated"]; experimental - []
object_prefix: "" # stable - "", experimental - "Experimental"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@ object AndroidExperimentalAttributes {
* href="https://developer.android.com/guide/components/activities/activity-lifecycle#lc">Activity lifecycle
* callbacks</a>, and from which the `OS identifiers` are derived.
*/
@deprecated("Replaced by `device.app.lifecycle`.", "")
val AndroidState: AttributeKey[String] =
AttributeKey("android.state")

/** Values for [[AndroidState]].
*/
@deprecated("Replaced by `device.app.lifecycle`.", "")
abstract class AndroidStateValue(val value: String)
@annotation.nowarn("cat=deprecation")
object AndroidStateValue {

/** Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ package experimental.attributes
// DO NOT EDIT, this is an Auto-generated file from buildscripts/templates/registry/otel4s/attributes/SemanticAttributes.scala.j2
object AzExperimentalAttributes {

/** <a
* href="https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers">Azure
* Resource Provider Namespace</a> as recognized by the client.
*/
val AzNamespace: AttributeKey[String] =
AttributeKey("az.namespace")

/** The unique identifier of the service request. It's generated by the Azure service and returned with the response.
*/
val AzServiceRequestId: AttributeKey[String] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ object CloudExperimentalAttributes {
* resource</a> <li><strong>Azure:</strong> The <a
* href="https://docs.microsoft.com/rest/api/resources/resources/get-by-id">Fully Qualified Resource ID</a> of the
* invoked function, <em>not</em> the function app, having the form
* `/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.
* `/subscriptions/<SUBSCRIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.
* This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would
* usually share a TracerProvider. </ul>
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
/*
* Copyright 2023 Typelevel
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.typelevel.otel4s
package semconv
package experimental.attributes

// DO NOT EDIT, this is an Auto-generated file from buildscripts/templates/registry/otel4s/attributes/SemanticAttributes.scala.j2
object CloudfoundryExperimentalAttributes {

/** The guid of the application. <p>
* @note
* <p> Application instrumentation should use the value from environment variable
* `VCAP_APPLICATION.application_id`. This is the same value as reported by `cf app <app-name> --guid`.
*/
val CloudfoundryAppId: AttributeKey[String] =
AttributeKey("cloudfoundry.app.id")

/** The index of the application instance. 0 when just one instance is active. <p>
* @note
* <p> CloudFoundry defines the `instance_id` in the <a
* href="https:/cloudfoundry/loggregator-api#v2-envelope">Loggegator v2 envelope</a>. It is used for
* logs and metrics emitted by CloudFoundry. It is supposed to contain the application instance index for
* applications deployed on the runtime. <p> Application instrumentation should use the value from environment
* variable `CF_INSTANCE_INDEX`.
*/
val CloudfoundryAppInstanceId: AttributeKey[String] =
AttributeKey("cloudfoundry.app.instance.id")

/** The name of the application. <p>
* @note
* <p> Application instrumentation should use the value from environment variable
* `VCAP_APPLICATION.application_name`. This is the same value as reported by `cf apps`.
*/
val CloudfoundryAppName: AttributeKey[String] =
AttributeKey("cloudfoundry.app.name")

/** The guid of the CloudFoundry org the application is running in. <p>
* @note
* <p> Application instrumentation should use the value from environment variable `VCAP_APPLICATION.org_id`. This
* is the same value as reported by `cf org <org-name> --guid`.
*/
val CloudfoundryOrgId: AttributeKey[String] =
AttributeKey("cloudfoundry.org.id")

/** The name of the CloudFoundry organization the app is running in. <p>
* @note
* <p> Application instrumentation should use the value from environment variable `VCAP_APPLICATION.org_name`. This
* is the same value as reported by `cf orgs`.
*/
val CloudfoundryOrgName: AttributeKey[String] =
AttributeKey("cloudfoundry.org.name")

/** The UID identifying the process. <p>
* @note
* <p> Application instrumentation should use the value from environment variable `VCAP_APPLICATION.process_id`. It
* is supposed to be equal to `VCAP_APPLICATION.app_id` for applications deployed to the runtime. For system
* components, this could be the actual PID.
*/
val CloudfoundryProcessId: AttributeKey[String] =
AttributeKey("cloudfoundry.process.id")

/** The type of process. <p>
* @note
* <p> CloudFoundry applications can consist of multiple jobs. Usually the main process will be of type `web`.
* There can be additional background tasks or side-cars with different process types.
*/
val CloudfoundryProcessType: AttributeKey[String] =
AttributeKey("cloudfoundry.process.type")

/** The guid of the CloudFoundry space the application is running in. <p>
* @note
* <p> Application instrumentation should use the value from environment variable `VCAP_APPLICATION.space_id`. This
* is the same value as reported by `cf space <space-name> --guid`.
*/
val CloudfoundrySpaceId: AttributeKey[String] =
AttributeKey("cloudfoundry.space.id")

/** The name of the CloudFoundry space the application is running in. <p>
* @note
* <p> Application instrumentation should use the value from environment variable `VCAP_APPLICATION.space_name`.
* This is the same value as reported by `cf spaces`.
*/
val CloudfoundrySpaceName: AttributeKey[String] =
AttributeKey("cloudfoundry.space.name")

/** A guid or another name describing the event source. <p>
* @note
* <p> CloudFoundry defines the `source_id` in the <a
* href="https:/cloudfoundry/loggregator-api#v2-envelope">Loggregator v2 envelope</a>. It is used for
* logs and metrics emitted by CloudFoundry. It is supposed to contain the component name, e.g. "gorouter", for
* CloudFoundry components. <p> When system components are instrumented, values from the <a
* href="https://bosh.io/docs/jobs/#properties-spec">Bosh spec</a> should be used. The `system.id` should be set to
* `spec.deployment/spec.name`.
*/
val CloudfoundrySystemId: AttributeKey[String] =
AttributeKey("cloudfoundry.system.id")

/** A guid describing the concrete instance of the event source. <p>
* @note
* <p> CloudFoundry defines the `instance_id` in the <a
* href="https:/cloudfoundry/loggregator-api#v2-envelope">Loggregator v2 envelope</a>. It is used for
* logs and metrics emitted by CloudFoundry. It is supposed to contain the vm id for CloudFoundry components. <p>
* When system components are instrumented, values from the <a
* href="https://bosh.io/docs/jobs/#properties-spec">Bosh spec</a> should be used. The `system.instance.id` should
* be set to `spec.id`.
*/
val CloudfoundrySystemInstanceId: AttributeKey[String] =
AttributeKey("cloudfoundry.system.instance.id")

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ object ContainerExperimentalAttributes {
val ContainerCommand: AttributeKey[String] =
AttributeKey("container.command")

/** All the command arguments (including the command/executable itself) run by the container. [2]
/** All the command arguments (including the command/executable itself) run by the container.
*/
val ContainerCommandArgs: AttributeKey[Seq[String]] =
AttributeKey("container.command_args")

/** The full command run by the container as a single string representing the full command. [2]
/** The full command run by the container as a single string representing the full command.
*/
val ContainerCommandLine: AttributeKey[String] =
AttributeKey("container.command_line")
Expand All @@ -45,8 +45,26 @@ object ContainerExperimentalAttributes {
val ContainerCpuState: AttributeKey[String] =
AttributeKey("container.cpu.state")

/** The name of the CSI (<a href="https:/container-storage-interface/spec">Container Storage
* Interface</a>) plugin used by the volume. <p>
* @note
* <p> This can sometimes be referred to as a "driver" in CSI implementations. This should represent the `name`
* field of the GetPluginInfo RPC.
*/
val ContainerCsiPluginName: AttributeKey[String] =
AttributeKey("container.csi.plugin.name")

/** The unique volume ID returned by the CSI (<a href="https:/container-storage-interface/spec">Container
* Storage Interface</a>) plugin. <p>
* @note
* <p> This can sometimes be referred to as a "volume handle" in CSI implementations. This should represent the
* `Volume.volume_id` field in CSI spec.
*/
val ContainerCsiVolumeId: AttributeKey[String] =
AttributeKey("container.csi.volume.id")

/** Container ID. Usually a UUID, as for example used to <a
* href="https://docs.docker.com/engine/reference/run/#container-identification">identify Docker containers</a>. The
* href="https://docs.docker.com/engine/containers/run/#container-identification">identify Docker containers</a>. The
* UUID might be abbreviated.
*/
val ContainerId: AttributeKey[String] =
Expand Down
Loading

0 comments on commit 30fb9fd

Please sign in to comment.