Skip to content

Commit

Permalink
Adding webengine definition under resources semantic conventions (#1293)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivomagi authored Apr 1, 2021
1 parent cf59c0b commit ef4612d
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
22 changes: 22 additions & 0 deletions semantic_conventions/resource/webengine.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
groups:
- id: webengine_resource
prefix: webengine
brief: >
Resource describing the packaged software running the application code. Web engines are typically executed using process.runtime.
attributes:
- id: name
type: string
required: always
brief: >
The name of the web engine.
examples: ['WildFly']
- id: version
type: string
brief: >
The version of the web engine.
examples: ['21.0.0']
- id: description
type: string
brief: >
Additional description of the web engine (e.g. detailed version and edition information).
examples: ['WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final']
1 change: 1 addition & 0 deletions specification/resource/semantic_conventions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ Attributes defining a compute unit (e.g. Container, Process, Function as a Servi
- [Container](./container.md)
- [Function as a Service](./faas.md)
- [Process](./process.md)
- [Web engine](./webengine.md)

## Compute Instance

Expand Down
22 changes: 22 additions & 0 deletions specification/resource/semantic_conventions/webengine.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Webengine

**type:** `webengine`

**Description:** Resource describing the packaged software running the application code. Web engines are typically executed using process.runtime.

<!-- semconv webengine_resource -->
| Attribute | Type | Description | Examples | Required |
|---|---|---|---|---|
| `webengine.name` | string | The name of the web engine. | `WildFly` | Yes |
| `webengine.version` | string | The version of the web engine. | `21.0.0` | No |
| `webengine.description` | string | Additional description of the web engine (e.g. detailed version and edition information). | `WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final` | No |
<!-- endsemconv -->

Information describing the web engine SHOULD be captured using the values acquired from the API provided by the web engine, preferably during runtime, to avoid maintenance burden on engine version upgrades. As an example - Java engines are often but not always packaged as application servers. For Java application servers supporting Servlet API the required information MAY be captured by invoking `ServletContext.getServerInfo()` during runtime and parsing the result.

A resource can be attributed to at most one web engine.

The situations where there are multiple candidates, it is up to instrumentation library authors to choose the web engine. To illustrate, let's look at a Python application using Apache HTTP Server with mod_wsgi as the server and Django as the web framework. In this situation:

* Either Apache HTTP Server or `mod_wsgi` MAY be chosen as `webengine`, depending on the decision made by the instrumentation authors.
* Django SHOULD NOT be set as an `webengine` as the required information is already available in insrumentation library and setting this into `webengine` would duplicate the information.

0 comments on commit ef4612d

Please sign in to comment.