Skip to content

Commit

Permalink
Move Go website_docs into opentelemetry.io repo (#2872)
Browse files Browse the repository at this point in the history
Co-authored-by: Severin Neumann <neumanns@cisco.com>
Co-authored-by: Phillip Carter <pcarter@fastmail.com>
  • Loading branch information
3 people authored Jun 17, 2023
1 parent 4c873f2 commit a6a6b30
Show file tree
Hide file tree
Showing 15 changed files with 1,281 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ content/en/docs/collector @open-telemetry/docs-approvers @open-te
content/en/docs/demo @open-telemetry/docs-approvers @open-telemetry/demo-approvers
content/en/docs/instrumentation/cpp/ @open-telemetry/docs-approvers @open-telemetry/cpp-maintainers
content/en/docs/instrumentation/erlang/ @open-telemetry/docs-approvers @open-telemetry/erlang-approvers
# go is a content module
content/en/docs/instrumentation/go/ @open-telemetry/docs-approvers @open-telemetry/go-instrumentation-approvers
content/en/docs/instrumentation/java/ @open-telemetry/docs-approvers @open-telemetry/java-maintainers @open-telemetry/java-instrumentation-maintainers
content/en/docs/instrumentation/js/ @open-telemetry/docs-approvers @open-telemetry/javascript-approvers
content/en/docs/instrumentation/net/ @open-telemetry/docs-approvers @open-telemetry/dotnet-approvers @open-telemetry/dotnet-instrumentation-approvers
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
path = themes/docsy
url = https://github.com/cncf/docsy.git
branch = opentelemetry.io
[submodule "content-modules/opentelemetry-go"]
path = content-modules/opentelemetry-go
url = https://github.com/open-telemetry/opentelemetry-go
[submodule "content-modules/opentelemetry-specification"]
path = content-modules/opentelemetry-specification
url = https://github.com/open-telemetry/opentelemetry-specification.git
Expand Down
6 changes: 0 additions & 6 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
!/content-modules/community/mission-vision-values.md
!/content-modules/community/roadmap.md

!/content-modules/opentelemetry-go
/content-modules/opentelemetry-go/*
!/content-modules/opentelemetry-go/website_docs
/content-modules/opentelemetry-go/website_docs/**/*
!/content-modules/opentelemetry-go/website_docs/**/*.md

# Ignore generated resources

package-lock.json
Expand Down
1 change: 0 additions & 1 deletion content-modules/opentelemetry-go
Submodule opentelemetry-go deleted from 4f4815
14 changes: 14 additions & 0 deletions content/en/docs/instrumentation/go/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Go
description: >-
<img width="35" class="img-initial" src="/img/logos/32x32/Golang_SDK.svg"
alt="Go"></img> A language-specific implementation of OpenTelemetry in Go.
aliases: [/golang, /golang/metrics, /golang/tracing]
weight: 16
---

{{% docs/instrumentation/index-intro go /%}}

## More

- [Contrib repository](https://github.com/open-telemetry/opentelemetry-go-contrib)
8 changes: 8 additions & 0 deletions content/en/docs/instrumentation/go/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: API reference
linkTitle: API
redirect: https://pkg.go.dev/go.opentelemetry.io/otel
manualLinkTarget: _blank
_build: { render: link }
weight: 210
---
7 changes: 7 additions & 0 deletions content/en/docs/instrumentation/go/examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Examples
redirect: https://github.com/open-telemetry/opentelemetry-go/tree/main/example
manualLinkTarget: _blank
_build: { render: link }
weight: 220
---
57 changes: 57 additions & 0 deletions content/en/docs/instrumentation/go/exporters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Exporters
aliases: [/docs/instrumentation/go/exporting_data]
weight: 50
---

In order to visualize and analyze your [traces](/docs/concepts/signals/traces/)
and metrics, you will need to export them to a backend.

## OTLP endpoint

To send trace data to an OTLP endpoint (like the [collector](/docs/collector) or
Jaeger >= v1.35.0) you'll want to configure an OTLP exporter that sends to your
endpoint.

### Using HTTP

```go
import (
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
)

func installExportPipeline(ctx context.Context) (func(context.Context) error, error) {
client := otlptracehttp.NewClient()
exporter, err := otlptrace.New(ctx, client)
if err != nil {
return nil, fmt.Errorf("creating OTLP trace exporter: %w", err)
}
/**/
}
```

To learn more on how to use the OTLP HTTP exporter, try out the
[otel-collector](https://github.com/open-telemetry/opentelemetry-go/tree/main/example/otel-collector)

### Jaeger

To try out the OTLP exporter, since v1.35.0 you can run
[Jaeger](https://www.jaegertracing.io/) as an OTLP endpoint and for trace
visualization in a docker container:

```shell
docker run -d --name jaeger \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4318:4318 \
jaegertracing/all-in-one:latest
```

## Prometheus

Prometheus export is available in the
`go.opentelemetry.io/otel/exporters/prometheus` package.

Please find more documentation on
[GitHub](https://github.com/open-telemetry/opentelemetry-go/tree/main/exporters/prometheus)
Loading

0 comments on commit a6a6b30

Please sign in to comment.