Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from open-telemetry:main #163

Merged
merged 11 commits into from
Jul 10, 2024
Merged
9 changes: 9 additions & 0 deletions content/en/announcements/kubecon-china.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: KubeCon China
date: 2024-07-10
expiryDate: 2024-08-23
---

<i class="fas fa-bullhorn"></i> Join us in Hong Kong for
[**KubeCon + CloudNativeCon + OpenSourceSummit + AI_dev**](/blog/2024/kubecon-china/)
, August 21 - 23, 2024
47 changes: 47 additions & 0 deletions content/en/blog/2024/kubecon-china.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: OpenTelemetry Talks at KubeCon China 2024
linkTitle: KubeCon China 2024
date: 2024-07-10
# prettier-ignore
cSpell:ignore: Alhamdani Censhare EBPF Hrabusa Husni Huxing Jiahang Krom Sianturi Wanqi Zhang Zihao Ziyi
author: '[Tiffany Hrabusa](https://github.com/tiffany76)'
sig: Communications SIG
---

Join members of the OpenTelemetry community at
[KubeCon + CloudNativeCon + Open Source Summit + AI_dev](https://events.linuxfoundation.org/kubecon-cloudnativecon-open-source-summit-ai-dev-china/)
in Hong Kong from August 21 to 23, 2024.

This post covers OpenTelemetry related events at the venue and will be updated
as we receive notice of new activities. Check back regularly before the
conference begins.

## Maintainer sessions

- **[OpenTelemetry Community Update | OpenTelemetry社区更新](https://sched.co/1eYcJ)**<br>
by Zihao Rao & Huxing Zhang, Alibaba Cloud<br> Wednesday, August 21 • 3:35 -
4:10

## AI_dev talks

- **[Adaptive Tracing Propagation with OpenTelemetry: Navigating Protocol Diversity in the Cloud | Project Lightning Talk](https://sched.co/1f4zX)**<br>
Wednesday, August 21 • 12:03 - 12:08
- **[Telemetry API and OpenTelemetry: the answer of istio monitoring? | Project Lightning Talk](https://sched.co/1f4zz)**<br>
Wednesday, August 21 • 12:24 - 12:29

## KubeCon talks

- **[The Journey of Next-Gen FinTech IDP at China Merchants Bank | 中国招商银行下一代金融科技IDP之旅](https://sched.co/1eYYg)**<br>
by Jiahang Xu, China Merchants Bank<br> Thursday, August 22 • 11:00 - 11:35
<!-- prettier-ignore-start -->
- **[Implement Auto Instrumentation Under GraalVM Static Compilation on OTel Java Agent | GraalVM 静态编译下 OTel Java Agent 的自动增强方案与实现](https://sched.co/1eYZA)**<br>
by Zihao Rao & Ziyi Lin, Alibaba Cloud<br> Thursday, August 22 • 1:50 - 2:25
<!-- prettier-ignore-end -->
- **[OpAMP: Scaling OpenTelemetry with Flexibility | OpAMP:灵活扩展OpenTelemetry](https://sched.co/1eYZt)**<br>
by Husni Alhamdani, Censhare & Herbert Sianturi, Krom Bank<br> Thursday,
August 22 • 3:35 - 4:10
- **[OpenTelemetry Amplified: Full Observability with EBPF-Enabled Distributed Tracing | OpenTelemetry放大:使用eBPF启用的分布式跟踪实现全面的可观测性](https://sched.co/1eYZq)**<br>
by Kai Liu, Alibaba Cloud & Wanqi Yang, Sun Yat<br> Thursday, August 22 •
5:15 - 5:50

Come listen, learn, and get involved in OpenTelemetry. See you in Hong Kong!
6 changes: 3 additions & 3 deletions content/en/docs/languages/erlang/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ and the [Zipkin protocol](https://hex.pm/packages/opentelemetry_zipkin).
## Initialization and Configuration

Configuration is done through the
[Application environment](https://erlang.org/doc/design_principles/applications.html#configuring-an-application)
[OTP application environment](https://erlang.org/doc/design_principles/applications.html#configuring-an-application)
or
[OS Environment Variables](/docs/specs/otel/configuration/sdk-environment-variables/).
The SDK (`opentelemetry` Application) uses the configuration to initialize a
Expand All @@ -470,8 +470,8 @@ variety of exporters through its ecosystem, including popular open source tools
like Jaeger and Zipkin.

To configure OpenTelemetry to use a particular exporter, in this case
`otel_exporter_stdout`, the Application environment for `opentelemetry` must set
the `exporter` for the span processor `otel_batch_processor`, a type of span
`otel_exporter_stdout`, the OTP application environment for `opentelemetry` must
set the `exporter` for the span processor `otel_batch_processor`, a type of span
processor that batches up multiple spans over a period of time:

{{< tabpane text=true >}} {{% tab Erlang %}}
Expand Down
23 changes: 16 additions & 7 deletions content/en/docs/languages/erlang/propagation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,28 @@ weight: 60
cSpell:ignore: elli
---

## Cross Service Propagators
{{% docs/languages/propagation erlang %}}

## Automatic context propagation

Distributed traces extend beyond a single service, meaning some context must be
propagated across services to create the parent-child relationship between
Spans. This requires cross service
[_context propagation_](/docs/specs/otel/overview/#context-propagation), a
mechanism where identifiers for a Trace are sent to remote processes.

Instrumentation Libraries for HTTP frameworks and servers like
Instrumentation libraries for HTTP frameworks and servers like
[Phoenix](https://github.com/open-telemetry/opentelemetry-erlang-contrib/tree/main/instrumentation/opentelemetry_phoenix),
[Cowboy](https://github.com/open-telemetry/opentelemetry-erlang-contrib/tree/main/instrumentation/opentelemetry_cowboy),
[Elli](https://github.com/open-telemetry/opentelemetry-erlang-contrib/tree/main/instrumentation/opentelemetry_elli)
and clients like
[Tesla](https://github.com/open-telemetry/opentelemetry-erlang-contrib/tree/main/instrumentation/opentelemetry_tesla)
will automatically inject or extract context using the globally registered
automatically inject or extract context using the globally registered
propagators. By default the global propagators used are the W3C
[Trace Context](https://w3c.github.io/trace-context/) and
[Baggage](https://www.w3.org/TR/baggage/) formats.

These global propagators can be configured by the Application environment
You can configure global propagators using the the OTP application environment
variable `text_map_propagators`:

{{< tabpane text=true >}} {{% tab Erlang %}}
Expand All @@ -47,13 +49,15 @@ text_map_propagators: [:baggage, :trace_context],

{{% /tab %}} {{< /tabpane >}}

Or through a comma separated list with the environment variable
You can also pass a comma separated list using the environment variable
`OTEL_PROPAGATORS`. Both forms of configuration accept the values
`trace_context`, `baggage`, [`b3`](https://github.com/openzipkin/b3-propagation)
and `b3multi`.

To manually inject or extract context the `otel_propagator_text_map` module can
be used:
## Manual context propagation

To manually inject or extract context, you can use the
`otel_propagator_text_map` module:

{{< tabpane text=true >}} {{% tab Erlang %}}

Expand Down Expand Up @@ -81,3 +85,8 @@ headers = :otel_propagator_text_map.inject([])
globally registered propagators. To use a specific propagator
`otel_propagator_text_map:inject/2` and `otel_propagator_text_map:extract/2` can
be used with the first argument being the name of the propagator module to call.

## Next steps

To learn more about propagation, read the
[Propagators API specification](/docs/specs/otel/context/api-propagators/).
8 changes: 4 additions & 4 deletions content/en/docs/languages/erlang/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cSpell:ignore: behaviour

Resource detectors fetch resource attributes from various sources. The default
detectors use the OS environment variable `OTEL_RESOURCE_ATTRIBUTES` and the
`opentelemetry` OTP Application environment variable `resource`.
`opentelemetry` OTP application environment variable `resource`.

The detectors to use is a list of module names and can be configured in the
Application configuration:
Expand Down Expand Up @@ -49,7 +49,7 @@ indefinitely. The default is 5000 milliseconds and can be set with environment
variable `OTEL_RESOURCE_DETECTOR_TIMEOUT` or Application variable
`otel_resource_detector_timeout`.

## Adding resources with OS and Application environment variables
## Adding resources with OS and OTP application environment variables

With the two default resource detectors enabled you can set resource attributes
either with the OS environment variable `OTEL_RESOURCE_ATTRIBUTES`:
Expand All @@ -58,7 +58,7 @@ either with the OS environment variable `OTEL_RESOURCE_ATTRIBUTES`:
OTEL_RESOURCE_ATTRIBUTES="deployment.environment=development"
```

Alternatively, use the `resource` Application environment under the
Alternatively, use the `resource` OTP application environment under the
`opentelemetry` Application configuration of `sys.config` or `runtime.exs`:

{{< tabpane text=true >}} {{% tab Erlang %}}
Expand All @@ -77,7 +77,7 @@ config :opentelemetry, resource: %{deployment: %{environment: "development" }}

{{% /tab %}} {{< /tabpane >}}

Resource attributes in the `resource` Application environment variable are
Resource attributes in the `resource` OTP application environment variable are
flattened and combined with `.`, so
`#{deployment => #{environment => <<"development">> }` is the same as
`#{'deployment.environment' => <<"development">>}`.
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/languages/java/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cascade:
vers:
instrumentation: 2.5.0
otel: 1.40.0
semconv: 1.25.0
semconv: 1.26.0
weight: 18
---

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/languages/js/propagation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cSpell:ignore: rolldice

{{% docs/languages/propagation js %}}

## Automatic context propagations
## Automatic context propagation

[Instrumentation libraries](../libraries/) like
[`@opentelemetry/instrumentation-http`](https://www.npmjs.com/package/@opentelemetry/instrumentation-http)
Expand Down
56 changes: 33 additions & 23 deletions content/en/docs/languages/php/propagation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,62 @@ description: Context propagation for the PHP API
weight: 60
---

{{% docs/languages/propagation php %}}

Propagation is the mechanism that moves data between services and processes.
Although not limited to tracing, it is what allows traces to build causal
Although not limited to tracing, propagation allows traces to build causal
information about a system across services that are arbitrarily distributed
across process and network boundaries.

OpenTelemetry provides a text-based approach to propagate context to remote
services using the [W3C Trace Context](https://www.w3.org/TR/trace-context/)
HTTP headers.

## Context propagation with frameworks and libraries
## Automatic context propagation

Auto-instrumentation exists for some popular PHP frameworks (eg. Symfony,
Laravel, Slim) and HTTP libraries propagate context for incoming and outgoing
Auto-instrumentation exists for some popular PHP frameworks, such as Symfony,
Laravel, or Slim. HTTP libraries propagate context for incoming and outgoing
HTTP requests.

**We highly recommend that you use auto-instrumentation or instrumentation
libraries to propagate context**. Although it is possible to propagate context
manually, the PHP auto-instrumentation and instrumentation libraries are
well-tested and easier to use.
{{% alert title="Note" %}}

Use auto-instrumentation or instrumentation libraries to propagate context.
Although you can propagate context manually, the PHP auto-instrumentation and
instrumentation libraries are well-tested and easier to use.

{{% /alert %}}

### Incoming
### Incoming requests

Auto-instrumentation for frameworks which implement the
[PSR-15](https://www.php-fig.org/psr/psr-15/) `RequestHandlerInterface` will
[PSR-15](https://www.php-fig.org/psr/psr-15/) `RequestHandlerInterface`
automatically extract W3C tracecontext headers, create a root span, and set a
remote parent for the root span.

```shell
composer require open-telemetry/opentelemetry-auto-psr15
```

### Outgoing
### Outgoing requests

[PSR-18](https://www.php-fig.org/psr/psr-18/) auto-instrumentation will
automatically apply W3C tracecontext headers to outgoing HTTP requests for any
library which implements the PSR-18 interface.
[PSR-18](https://www.php-fig.org/psr/psr-18/) auto-instrumentation automatically
apply W3C tracecontext headers to outgoing HTTP requests for any library which
implements the PSR-18 interface.

```shell
open-telemetry/opentelemetry-auto-psr18
```

## Manual W3C Trace Context Propagation
## Manual context propagation

In some cases, it is not possible to propagate context with an instrumentation
library. There may not be an instrumentation library that matches a library
you're using to have services communicate with one another. Or you many have
In some cases, it is not possible to propagate context using an instrumentation
library. There might not be an instrumentation library that matches a library
you're using to have services communicate with each other. Or you might have
requirements that instrumentation libraries cannot fulfill, even if they exist.

When you must propagate context manually, you can use the context API.
When you must propagate context manually, use the context API.

The following presents an example of an outgoing HTTP request:
The following snippet shows an example of an outgoing HTTP request:

```php
$request = new Request('GET', 'http://localhost:8080/resource');
Expand All @@ -74,9 +79,9 @@ try {
}
```

Similarly, the text-based approach can be used to read the W3C Trace Context
from incoming requests. The following presents an example of processing an
incoming HTTP request:
Similarly, use the text-based approach to read the W3C Trace Context from
incoming requests. The following presents an example of processing an incoming
HTTP request:

```php
$request = ServerRequestCreator::createFromGlobals();
Expand All @@ -94,3 +99,8 @@ try {
$scope->detach();
}
```

## Next steps

To learn more about propagation, read the
[Propagators API specification](/docs/specs/otel/context/api-propagators/).
53 changes: 45 additions & 8 deletions content/en/docs/zero-code/java/agent/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ name="otel.instrumentation.common.db-statement-sanitizer.enabled"
default=true
%}} Enables the DB statement sanitization. {{% /config_option %}}

### Capturing HTTP request and response headers
### HTTP instrumentation configuration

#### Capturing HTTP request and response headers

You can configure the agent to capture predefined HTTP headers as span
attributes, according to the
Expand Down Expand Up @@ -210,7 +212,7 @@ instrumentations.
> **Note**: The property/environment variable names listed in the table are
> still experimental, and thus are subject to change.

### Capturing servlet request parameters
#### Capturing servlet request parameters

You can configure the agent to capture predefined HTTP request parameter as span
attributes for requests that are handled by Servlet API. Use the following
Expand All @@ -222,6 +224,47 @@ A comma-separated list of request parameter names. {{% /config_option %}}
> **Note**: The property/environment variable names listed in the table are
> still experimental, and thus are subject to change.

#### Configuring known HTTP methods

Configures the instrumentation to recognize an alternative set of HTTP request
methods. All other methods will be treated as `_OTHER`.

{{% config_option
name="otel.instrumentation.http.known-methods"
default="CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE"
%}} A comma-separated list of known HTTP methods. {{% /config_option %}}

#### Enabling experimental HTTP telemetry

You can configure the agent to capture additional experimental HTTP telemetry
data.

{{% config_option
name="otel.instrumentation.http.client.emit-experimental-telemetry"
default=false
%}} Enables the experimental HTTP client telemetry. {{% /config_option %}}

{{% config_option name="otel.instrumentation.http.server.emit-experimental-telemetry"
default=false
%}}
Enables the experimental HTTP server telemetry. {{% /config_option %}}

For client and server spans, the following attributes are added:

- `http.request.body.size` and `http.response.body.size`: The size of the
request and response bodies, respectively.

For client metrics, the following metrics are created:

- [http.client.request.body.size](/docs/specs/semconv/http/http-metrics/#metric-httpclientrequestbodysize)
- [http.client.response.body.size](/docs/specs/semconv/http/http-metrics/#metric-httpclientresponsebodysize)

For server metrics, the following metrics are created:

- [http.server.active_requests](/docs/specs/semconv/http/http-metrics/#metric-httpserveractive_requests)
- [http.server.request.body.size](/docs/specs/semconv/http/http-metrics/#metric-httpserverrequestbodysize)
- [http.server.response.body.size](/docs/specs/semconv/http/http-metrics/#metric-httpserverresponsebodysize)

### Capturing consumer message receive telemetry in messaging instrumentations

You can configure the agent to capture the consumer message receive telemetry in
Expand Down Expand Up @@ -253,12 +296,6 @@ and
> attributes. You must carefully evaluate each attribute's privacy implications
> before enabling the collection of the data.

{{% config_option
name="otel.instrumentation.common.enduser.enabled"
default=false
%}} Common flag for enabling/disabling enduser attributes.
{{% /config_option %}}

{{% config_option
name="otel.instrumentation.common.enduser.id.enabled"
default=false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Additional instrumentation
weight: 50
weight: 60
---

The OpenTelemetry Spring Boot starter provides
Expand Down
Loading
Loading