Skip to content

Commit

Permalink
Merge branch 'main' into ja/demo/tests-and-forking
Browse files Browse the repository at this point in the history
  • Loading branch information
yugo-ibuki committed Jan 21, 2025
2 parents d8f5106 + efb4d34 commit 1afc4ec
Show file tree
Hide file tree
Showing 45 changed files with 300 additions and 108 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
description: Regex of submodule paths to update to HEAD before building.
default: content-modules
type: string
workflow_call:
inputs:
submodule_path_regex:
type: string
required: true

jobs:
build-and-test:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/build-semconv-daily.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build Semantic Conventions (daily)

on:
schedule:
# daily at 10:24 UTC
- cron: '24 10 * * *'
workflow_dispatch:

jobs:
build-dev:
uses: ./.github/workflows/build-dev.yml
with:
submodule_path_regex: semantic-conventions

workflow-notification:
needs:
- build-dev
if: always()
uses: ./.github/workflows/reusable-workflow-notification.yml
with:
success: ${{ needs.build-dev.result == 'success' }}
repo: open-telemetry/semantic-conventions
57 changes: 57 additions & 0 deletions .github/workflows/reusable-workflow-notification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# this is useful because notifications for scheduled workflows are only sent to the user who
# initially created the given workflow
name: Reusable - Workflow notification

on:
workflow_call:
inputs:
success:
type: boolean
required: true
repo:
type: string
required: false

jobs:
workflow-notification:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Open issue or add comment if issue already open
env:
# need to use opentelemetrybot for opening issues in other repos
GH_TOKEN:
${{ inputs.repo && secrets.OPENTELEMETRYBOT_GITHUB_TOKEN ||
secrets.GITHUB_TOKEN }}
run: |
if [ -z "${{ inputs.repo }}" ]; then
repo="$GITHUB_REPOSITORY"
title="Workflow failed: $GITHUB_WORKFLOW"
body="See [$GITHUB_WORKFLOW #$GITHUB_RUN_NUMBER](https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID)."
else
repo="${{ inputs.repo }}"
title="Workflow failed: $GITHUB_REPOSITORY $GITHUB_WORKFLOW"
body="See [$GITHUB_REPOSITORY $GITHUB_WORKFLOW #$GITHUB_RUN_NUMBER](https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID)."
fi
# TODO (trask) search doesn't support exact phrases, so it's possible that this could grab the wrong issue
number=$(gh issue list --repo $repo --search "in:title $title" --limit 1 --json number -q .[].number)
echo $number
echo ${{ inputs.success }}
if [[ $number ]]; then
if [[ "${{ inputs.success }}" == "true" ]]; then
gh issue close $number \
--repo $repo
else
gh issue comment $number \
--repo $repo \
--body "$body"
fi
elif [[ "${{ inputs.success }}" == "false" ]]; then
gh issue create --repo $repo \
--title "$title (#$GITHUB_RUN_NUMBER)" \
--body "$body"
fi
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[submodule "themes/docsy"]
path = themes/docsy
url = https://github.com/google/docsy.git
docsy-pin = v0.11.0-32-ge6d94771
docsy-pin = v0.11.0-34-gef59ee75
docsy-note = "2024-04-01 Switching to google/docsy.git from cncf/docsy.git since we don't have any CNCF customizations."
docsy-reminder = "Ensure that any tag referenced by `docsy-pin` is present in the remote repo (url), otherwise add (push) the tags to the repo."
[submodule "content-modules/opentelemetry-specification"]
Expand Down
2 changes: 0 additions & 2 deletions .htmltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ IgnoreURLs: # list of regexs of paths or URLs to be ignored

# Ignore some links to GH repo content for now, most 4XX
- ^https?://github\.com/open-telemetry/opentelemetry-demo/blob/main/src/(imageprovider|loadgenerator|otelcollector|.*service)
# TODO drop the following after https://github.com/open-telemetry/semantic-conventions/pull/1753 is merged and the submodule updated:
- ^https?://github\.com/in-toto/

# Too many redirects as the server tries to figure out the country and language,
# e.g.: https://www.microsoft.com/en-ca/sql-server.
Expand Down
4 changes: 1 addition & 3 deletions content/en/blog/2024/otel-operator-q-and-a/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ title:
Operator Q&A
linkTitle: OTel Operator Q&A
date: 2024-05-13
author: >-
[Adriana Villela](https://github.com/avillela) (ServiceNow),
author: '[Adriana Villela](https://github.com/avillela) (ServiceNow)'
canonical_url: https://adri-v.medium.com/81d63addbf92?
cSpell:ignore: automagically mycollector
---
Expand Down
22 changes: 11 additions & 11 deletions content/en/docs/kubernetes/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,17 @@ presets:
## If you want to send your data somewhere you need to
## configure an exporter, such as the otlpexporter
# config:
# exporters:
# otlp:
# endpoint: "<SOME BACKEND>"
# service:
# pipelines:
# traces:
# exporters: [ otlp ]
# metrics:
# exporters: [ otlp ]
# logs:
# exporters: [ otlp ]
# exporters:
# otlp:
# endpoint: "<SOME BACKEND>"
# service:
# pipelines:
# traces:
# exporters: [ otlp ]
# metrics:
# exporters: [ otlp ]
# logs:
# exporters: [ otlp ]
```

To use this `values.yaml` with the chart, save it to your preferred file
Expand Down
6 changes: 6 additions & 0 deletions content/en/docs/kubernetes/helm/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ and detailed descriptions can be found in the

## Installation

Add OpenTelemetry Helm repository:

```shell
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
```

To install the chart with the release name `my-otel-demo`, run the following
command:

Expand Down
6 changes: 4 additions & 2 deletions content/en/docs/kubernetes/operator/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ redirects:

## Introduction

The OpenTelemetry Operator is an implementation of a
The
[OpenTelemetry Operator](https://github.com/open-telemetry/opentelemetry-operator)
is an implementation of a
[Kubernetes Operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/).

The operator manages:

- OpenTelemetry Collector
- [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector)
- [auto-instrumentation of the workloads using OpenTelemetry instrumentation libraries](https://github.com/open-telemetry/opentelemetry-operator#opentelemetry-auto-instrumentation-injection)

## Getting started
Expand Down
143 changes: 107 additions & 36 deletions content/en/docs/kubernetes/operator/automatic.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,105 @@ spec:
For more details, see [.NET Auto Instrumentation docs](/docs/zero-code/net/).
### Deno
The following command creates a basic Instrumentation resource that is
configured for instrumenting [Deno](https://deno.com) services.
```bash
kubectl apply -f - <<EOF
apiVersion: opentelemetry.io/v1alpha1
kind: Instrumentation
metadata:
name: demo-instrumentation
spec:
env:
- name: OTEL_DENO
value: 'true'
exporter:
endpoint: http://demo-collector:4318
propagators:
- tracecontext
- baggage
sampler:
type: parentbased_traceidratio
argument: '1'
EOF
```

Deno processes automatically export telemetry data to the configured endpoint
when they are started with the `OTEL_DENO=true` environment variable. Therefore,
the example specifies this environment variable in the `env` field of the
Instrumentation resource, so it is set for all services that have env vars
injected with this Instrumentation resource.

By default, the Instrumentation resource that auto-instruments Deno services
uses `otlp` with the `http/proto` protocol. This means that the configured
endpoint must be able to receive OTLP over `http/proto`. Therefore, the example
uses `http://demo-collector:4318`, which connects to the `http/proto` port of
the `otlpreceiver` of the Collector created in the previous step.

{{% alert title="Note" color="info" %}}

[Deno's OpenTelemetry integration][deno-docs] is not yet stable. As a result all
workloads that want to be instrumented with Deno must have the `--unstable-otel`
flag set when starting the Deno process.

[deno-docs]: https://docs.deno.com/runtime/fundamentals/open_telemetry/

{{% /alert %}}

#### Configuration options {#deno-configuration-options}

By default, the Deno OpenTelemetry integration exports `console.log()` output
as\
[logs](/docs/concepts/signals/logs/), while still printing the logs to stdout /
stderr. You can configure these alternative behaviors:

- `OTEL_DENO_CONSOLE=replace`: only export `console.log()` output as logs; do
not print to stdout / stderr.
- `OTEL_DENO_CONSOLE=ignore`: do not export `console.log()` output as logs; do
print to stdout / stderr.

#### Learn more {#deno-learn-more}

For more details, see Deno's [OpenTelemetry integration][deno-otel-docs]
documentation.

[deno-otel-docs]: https://docs.deno.com/runtime/fundamentals/open_telemetry/

### Go

The following command creates a basic Instrumentation resource that is
configured specifically for instrumenting Go services.

```bash
kubectl apply -f - <<EOF
apiVersion: opentelemetry.io/v1alpha1
kind: Instrumentation
metadata:
name: demo-instrumentation
spec:
exporter:
endpoint: http://demo-collector:4318
propagators:
- tracecontext
- baggage
sampler:
type: parentbased_traceidratio
argument: "1"
EOF
```

By default, the Instrumentation resource that auto-instruments Go services uses
`otlp` with the `http/protobuf` protocol. This means that the configured
endpoint must be able to receive OTLP over `http/protobuf`. Therefore, the
example uses `http://demo-collector:4318`, which connects to the `http/protobuf`
port of the `otlpreceiver` of the Collector created in the previous step.

The Go auto-instrumentation does not support disabling any instrumentation.
[See the Go Auto-Instrumentation repository for more details.](https://github.com/open-telemetry/opentelemetry-go-instrumentation)

### Java

The following command creates a basic Instrumentation resource that is
Expand Down Expand Up @@ -436,38 +535,6 @@ For Python-specific quirks, see
and the
[Python agent configuration docs](/docs/zero-code/python/configuration/).

### Go

The following command creates a basic Instrumentation resource that is
configured specifically for instrumenting Go services.

```bash
kubectl apply -f - <<EOF
apiVersion: opentelemetry.io/v1alpha1
kind: Instrumentation
metadata:
name: demo-instrumentation
spec:
exporter:
endpoint: http://demo-collector:4318
propagators:
- tracecontext
- baggage
sampler:
type: parentbased_traceidratio
argument: "1"
EOF
```

By default, the Instrumentation resource that auto-instruments Go services uses
`otlp` with the `http/protobuf` protocol. This means that the configured
endpoint must be able to receive OTLP over `http/protobuf`. Therefore, the
example uses `http://demo-collector:4318`, which connects to the `http/protobuf`
port of the `otlpreceiver` of the Collector created in the previous step.

The Go auto-instrumentation does not support disabling any instrumentation.
[See the Go Auto-Instrumentation repository for more details.](https://github.com/open-telemetry/opentelemetry-go-instrumentation)

---

Now that your Instrumentation object is created, your cluster has the ability to
Expand All @@ -483,6 +550,7 @@ done by updating your service’s `spec.template.metadata.annotations` to includ
a language-specific annotation:

- .NET: `instrumentation.opentelemetry.io/inject-dotnet: "true"`
- Deno: `instrumentation.opentelemetry.io/inject-sdk: "true"`
- Go: `instrumentation.opentelemetry.io/inject-go: "true"`
- Java: `instrumentation.opentelemetry.io/inject-java: "true"`
- Node.js: `instrumentation.opentelemetry.io/inject-nodejs: "true"`
Expand Down Expand Up @@ -681,10 +749,13 @@ auto-instrumentation annotation.

Here are a few things to check for:

- **Is the auto-instrumentation for the right language?** For example, when
instrumenting a Python application, make sure that the annotation doesn't
incorrectly say `instrumentation.opentelemetry.io/inject-java: "true"`
instead.
- **Is the auto-instrumentation for the right language?**
- For example, when instrumenting a Python application, make sure that the
annotation doesn't incorrectly say
`instrumentation.opentelemetry.io/inject-java: "true"` instead.
- For **Deno**, make sure you are using the
`instrumentation.opentelemetry.io/inject-sdk: "true"` annotation, rather
than an annotation containing the string `deno`.
- **Is the auto-instrumentation annotation in the correct location?** When
defining a `Deployment`, annotations can be added in one of two locations:
`spec.metadata.annotations`, and `spec.template.metadata.annotations`. The
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 @@ -6,7 +6,7 @@ description: >-
aliases: [/java, /java/metrics, /java/tracing]
cascade:
vers:
instrumentation: 2.11.0
instrumentation: 2.12.0
otel: 1.46.0
contrib: 1.43.0
semconv: 1.29.0
Expand Down
7 changes: 2 additions & 5 deletions content/en/docs/specs/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ same as the **Protocol** status.
- [Specification][logging]
- {{% spec_status "Bridge API" "otel/logs/api" "Status" %}}
- {{% spec_status "SDK" "otel/logs/sdk" "Status" %}}
- {{% spec_status "Event API" "otel/logs/event-api" "Status" %}}
- {{% spec_status "Protocol" "otlp" "/document-status/.*for.*log" %}}
- Notes:
- The [logs data model][] is released as part of the OpenTelemetry Protocol.
Expand All @@ -111,10 +110,8 @@ same as the **Protocol** status.
- The OpenTelemetry Log SDK is the standard implementation of the Log Bridge
API. Applications configure the SDK to indicate how logs are processed and
exported (e.g. using OTLP).
- The OpenTelemetry Event API allows log records to be emitted which conform
to the [event semantic conventions][]. In contrast to the Log Bridge API,
the Event API is intended to be called by end users. The Event API is under
active development.
- The OpenTelemetry Log Bridge API contains experimental support for emitting
log records which conform to the [event semantic conventions][].

### Profiles

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/zero-code/java/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ aliases:
- /docs/languages/java/automatic_instrumentation
cascade:
vers:
instrumentation: 2.11.0
instrumentation: 2.12.0
otel: 1.46.0
---

Expand Down
Loading

0 comments on commit 1afc4ec

Please sign in to comment.