Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions site/external-baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@
}
},
"open-telemetry": {
"module": "github.com/labstack/echo-opentelemetry",
"version": "v0.0.3",
"module": "github.com/labstack/echo-otel/v5",
"version": "v5.0.0",
"configs": {
"Config": {
"ServerName": {
Expand Down Expand Up @@ -207,6 +207,7 @@
}
},
"functions": {
"ErrorType": "func ErrorType(code int, err error) string",
"NewMetrics": "func NewMetrics(meter metric.Meter) (*Metrics, error)",
"NewMiddleware": "func NewMiddleware(serverName string) echo.MiddlewareFunc",
"NewMiddlewareWithConfig": "func NewMiddlewareWithConfig(config Config) echo.MiddlewareFunc",
Expand Down
6 changes: 3 additions & 3 deletions site/external-sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"package": "echoprometheus"
},
"open-telemetry": {
"module": "github.com/labstack/echo-opentelemetry",
"version": "v0.0.3",
"repository": "https://github.com/labstack/echo-opentelemetry",
"module": "github.com/labstack/echo-otel/v5",
"version": "v5.0.0",
"repository": "https://github.com/labstack/echo-otel",
"package": "echootel"
}
}
18 changes: 12 additions & 6 deletions site/src/content/docs/es/middleware/open-telemetry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar:

import ConfigReference from '../../../../components/ConfigReference.astro';

[Echo OpenTelemetry](https://github.com/labstack/echo-opentelemetry) es un middleware que
[Echo OpenTelemetry](https://github.com/labstack/echo-otel) es un middleware que
proporciona instrumentación OpenTelemetry para requests HTTP.

OpenTelemetry es un conjunto de herramientas open-source que proporcionan instrumentación para
Expand All @@ -22,14 +22,20 @@ aplicaciones cloud-native.
Agrega la dependencia del middleware OpenTelemetry con Go modules:

```bash
go get github.com/labstack/echo-opentelemetry
go get github.com/labstack/echo-otel/v5
```

:::note
Las aplicaciones con Echo v4 usan `github.com/labstack/echo-otel/v4`. `github.com/labstack/echo-opentelemetry`
es el nombre anterior de este módulo y está obsoleto; consulta
[Migrating from echo-opentelemetry](https://github.com/labstack/echo-otel#migrating-from-echo-opentelemetry).
:::

Importa el middleware y la API de tracing de OpenTelemetry:

```go
import (
echootel "github.com/labstack/echo-opentelemetry"
echootel "github.com/labstack/echo-otel/v5"
"go.opentelemetry.io/otel/trace"
)
```
Expand All @@ -55,7 +61,7 @@ e.Use(echootel.NewMiddlewareWithConfig(echootel.Config{
```

Para opciones de configuración, consulta el struct
[`Config`](https://github.com/labstack/echo-opentelemetry/blob/main/otel.go#L28).
[`Config`](https://github.com/labstack/echo-otel/blob/main/otel.go#L31).

Agrega el middleware en forma simplificada proporcionando solo el nombre del servidor:

Expand All @@ -79,8 +85,8 @@ tracer, err := echo.ContextGet[trace.Tracer](c, echootel.TracerKey)

## Ejemplo

El [ejemplo](https://github.com/labstack/echo-opentelemetry/blob/main/example/main.go) exporta
metrics y spans a stdout, pero puedes usar cualquier exporter (OTLP, etc.). Consulta la
El [ejemplo](https://github.com/labstack/echo-otel/blob/main/example/main.go) exporta
spans a stdout, pero puedes usar cualquier exporter (OTLP, etc.). Consulta la
documentación de [OpenTelemetry exporters](https://opentelemetry.io/docs/languages/go/exporters).

## Referencia de la API
Expand Down
17 changes: 11 additions & 6 deletions site/src/content/docs/ja/middleware/open-telemetry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar:

import ConfigReference from '../../../../components/ConfigReference.astro';

[Echo OpenTelemetry](https://github.com/labstack/echo-opentelemetry) は、HTTP リクエスト向けの
[Echo OpenTelemetry](https://github.com/labstack/echo-otel) は、HTTP リクエスト向けの
OpenTelemetry インストルメンテーションを提供するミドルウェアです。

OpenTelemetry は、クラウドネイティブアプリケーション向けのインストルメンテーションを提供する
Expand All @@ -22,14 +22,19 @@ OpenTelemetry は、クラウドネイティブアプリケーション向けの
Go modules で OpenTelemetry ミドルウェア依存関係を追加します。

```bash
go get github.com/labstack/echo-opentelemetry
go get github.com/labstack/echo-otel/v5
```

:::note
Echo v4 アプリケーションでは `github.com/labstack/echo-otel/v4` を使用します。`github.com/labstack/echo-opentelemetry`
はこのモジュールの以前の名前で、非推奨です。[Migrating from echo-opentelemetry](https://github.com/labstack/echo-otel#migrating-from-echo-opentelemetry) を参照してください。
:::

ミドルウェアと OpenTelemetry trace API を import します。

```go
import (
echootel "github.com/labstack/echo-opentelemetry"
echootel "github.com/labstack/echo-otel/v5"
"go.opentelemetry.io/otel/trace"
)
```
Expand All @@ -54,7 +59,7 @@ e.Use(echootel.NewMiddlewareWithConfig(echootel.Config{
}))
```

設定オプションについては [`Config`](https://github.com/labstack/echo-opentelemetry/blob/main/otel.go#L28) struct を参照してください。
設定オプションについては [`Config`](https://github.com/labstack/echo-otel/blob/main/otel.go#L31) struct を参照してください。

サーバー名だけを指定する簡略形式でミドルウェアを追加します。

Expand All @@ -78,8 +83,8 @@ tracer, err := echo.ContextGet[trace.Tracer](c, echootel.TracerKey)

## 例

[example](https://github.com/labstack/echo-opentelemetry/blob/main/example/main.go) は
metrics と spans を stdout にエクスポートしますが、任意の exporter(OTLP など)を使えます。
[example](https://github.com/labstack/echo-otel/blob/main/example/main.go) は
spans を stdout にエクスポートしますが、任意の exporter(OTLP など)を使えます。
[OpenTelemetry exporters](https://opentelemetry.io/docs/languages/go/exporters) ドキュメントを参照してください。

## API リファレンス
Expand Down
18 changes: 12 additions & 6 deletions site/src/content/docs/middleware/open-telemetry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar:

import ConfigReference from '../../../components/ConfigReference.astro';

[Echo OpenTelemetry](https://github.com/labstack/echo-opentelemetry) is a middleware that
[Echo OpenTelemetry](https://github.com/labstack/echo-otel) is a middleware that
provides OpenTelemetry instrumentation for HTTP requests.

OpenTelemetry is a set of open-source tools that provide instrumentation for cloud-native
Expand All @@ -22,14 +22,20 @@ applications.
Add the OpenTelemetry middleware dependency with Go modules:

```bash
go get github.com/labstack/echo-opentelemetry
go get github.com/labstack/echo-otel/v5
```

:::note
Echo v4 applications use `github.com/labstack/echo-otel/v4`. `github.com/labstack/echo-opentelemetry`
is the deprecated previous name of this module; see
[Migrating from echo-opentelemetry](https://github.com/labstack/echo-otel#migrating-from-echo-opentelemetry).
:::

Import the middleware and the OpenTelemetry trace API:

```go
import (
echootel "github.com/labstack/echo-opentelemetry"
echootel "github.com/labstack/echo-otel/v5"
"go.opentelemetry.io/otel/trace"
)
```
Expand All @@ -54,7 +60,7 @@ e.Use(echootel.NewMiddlewareWithConfig(echootel.Config{
}))
```

For configuration options, see the [`Config`](https://github.com/labstack/echo-opentelemetry/blob/main/otel.go#L28) struct.
For configuration options, see the [`Config`](https://github.com/labstack/echo-otel/blob/main/otel.go#L31) struct.

Add the middleware in simplified form by providing only the server name:

Expand All @@ -78,8 +84,8 @@ tracer, err := echo.ContextGet[trace.Tracer](c, echootel.TracerKey)

## Example

The [example](https://github.com/labstack/echo-opentelemetry/blob/main/example/main.go) exports
metrics and spans to stdout, but you can use any exporter (OTLP, etc.). See the
The [example](https://github.com/labstack/echo-otel/blob/main/example/main.go) exports
spans to stdout, but you can use any exporter (OTLP, etc.). See the
[OpenTelemetry exporters](https://opentelemetry.io/docs/languages/go/exporters) documentation.

## API reference
Expand Down
18 changes: 12 additions & 6 deletions site/src/content/docs/pt-br/middleware/open-telemetry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar:

import ConfigReference from '../../../../components/ConfigReference.astro';

[Echo OpenTelemetry](https://github.com/labstack/echo-opentelemetry) é um middleware que
[Echo OpenTelemetry](https://github.com/labstack/echo-otel) é um middleware que
fornece instrumentação OpenTelemetry para requests HTTP.

OpenTelemetry é um conjunto de ferramentas open-source que fornecem instrumentação para aplicações
Expand All @@ -22,14 +22,20 @@ cloud-native.
Adicione a dependência do middleware OpenTelemetry com Go modules:

```bash
go get github.com/labstack/echo-opentelemetry
go get github.com/labstack/echo-otel/v5
```

:::note
Aplicações com Echo v4 usam `github.com/labstack/echo-otel/v4`. `github.com/labstack/echo-opentelemetry`
é o nome anterior deste módulo e está obsoleto; veja
[Migrating from echo-opentelemetry](https://github.com/labstack/echo-otel#migrating-from-echo-opentelemetry).
:::

Importe o middleware e a API de trace do OpenTelemetry:

```go
import (
echootel "github.com/labstack/echo-opentelemetry"
echootel "github.com/labstack/echo-otel/v5"
"go.opentelemetry.io/otel/trace"
)
```
Expand All @@ -54,7 +60,7 @@ e.Use(echootel.NewMiddlewareWithConfig(echootel.Config{
}))
```

Para opções de configuração, veja a struct [`Config`](https://github.com/labstack/echo-opentelemetry/blob/main/otel.go#L28).
Para opções de configuração, veja a struct [`Config`](https://github.com/labstack/echo-otel/blob/main/otel.go#L31).

Adicione o middleware de forma simplificada fornecendo apenas o nome do servidor:

Expand All @@ -78,8 +84,8 @@ tracer, err := echo.ContextGet[trace.Tracer](c, echootel.TracerKey)

## Exemplo

O [exemplo](https://github.com/labstack/echo-opentelemetry/blob/main/example/main.go) exporta
métricas e spans para stdout, mas você pode usar qualquer exporter (OTLP etc.). Veja a
O [exemplo](https://github.com/labstack/echo-otel/blob/main/example/main.go) exporta
spans para stdout, mas você pode usar qualquer exporter (OTLP etc.). Veja a
documentação de [OpenTelemetry exporters](https://opentelemetry.io/docs/languages/go/exporters).

## Referência da API
Expand Down
17 changes: 11 additions & 6 deletions site/src/content/docs/zh-cn/middleware/open-telemetry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar:

import ConfigReference from '../../../../components/ConfigReference.astro';

[Echo OpenTelemetry](https://github.com/labstack/echo-opentelemetry) 是一个为 HTTP 请求提供
[Echo OpenTelemetry](https://github.com/labstack/echo-otel) 是一个为 HTTP 请求提供
OpenTelemetry 插桩的中间件。

OpenTelemetry 是一组开源工具,为云原生应用提供插桩能力。
Expand All @@ -21,14 +21,19 @@ OpenTelemetry 是一组开源工具,为云原生应用提供插桩能力。
使用 Go modules 添加 OpenTelemetry 中间件依赖:

```bash
go get github.com/labstack/echo-opentelemetry
go get github.com/labstack/echo-otel/v5
```

:::note
Echo v4 应用使用 `github.com/labstack/echo-otel/v4`。`github.com/labstack/echo-opentelemetry`
是该模块以前的名称,已弃用;请参见 [Migrating from echo-opentelemetry](https://github.com/labstack/echo-otel#migrating-from-echo-opentelemetry)。
:::

导入中间件和 OpenTelemetry trace API:

```go
import (
echootel "github.com/labstack/echo-opentelemetry"
echootel "github.com/labstack/echo-otel/v5"
"go.opentelemetry.io/otel/trace"
)
```
Expand All @@ -53,7 +58,7 @@ e.Use(echootel.NewMiddlewareWithConfig(echootel.Config{
}))
```

配置选项请参见 [`Config`](https://github.com/labstack/echo-opentelemetry/blob/main/otel.go#L28) struct。
配置选项请参见 [`Config`](https://github.com/labstack/echo-otel/blob/main/otel.go#L31) struct。

只提供服务器名称,以简化形式添加中间件:

Expand All @@ -77,8 +82,8 @@ tracer, err := echo.ContextGet[trace.Tracer](c, echootel.TracerKey)

## 示例

[example](https://github.com/labstack/echo-opentelemetry/blob/main/example/main.go) 会把
metrics 和 spans 导出到 stdout,但你可以使用任何 exporter(OTLP 等)。请参见
[example](https://github.com/labstack/echo-otel/blob/main/example/main.go) 会把
spans 导出到 stdout,但你可以使用任何 exporter(OTLP 等)。请参见
[OpenTelemetry exporters](https://opentelemetry.io/docs/languages/go/exporters) 文档。

## API 参考
Expand Down
Loading