Skip to content

Commit

Permalink
Merge branch 'main' into chalin-code-excerpt-2024-02-04
Browse files Browse the repository at this point in the history
  • Loading branch information
theletterf authored Feb 13, 2024
2 parents 0cafa2e + e0c3eac commit 8c6a77a
Show file tree
Hide file tree
Showing 258 changed files with 1,161 additions and 1,056 deletions.
1 change: 1 addition & 0 deletions .cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ words:
- otep
- otlp
- overridable
- outro
- packagist
- Paixão
- parentbased
Expand Down
121 changes: 37 additions & 84 deletions .github/workflows/pr-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,87 +11,13 @@ env:
USER_NAME: opentelemetrybot

jobs:
fix-format:
name: /fix:format
pr-action:
name: Run PR action
runs-on: ubuntu-latest

if: |
github.event.issue.pull_request &&
contains(github.event.comment.body, '/fix:format')
permissions:
contents: write
pull-requests: write

steps:
- name: Context info
run: |
echo $PR_NUM
echo $COMMENT
- uses: actions/checkout@v4

- name: Write start comment
run: |
gh pr comment $PR_NUM -b "You triggered fix:format action run at $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
env:
GH_TOKEN: ${{ github.token }}

- run: gh pr checkout $PR_NUM -b "pr-action-${RANDOM}"
env:
GH_TOKEN: ${{ github.token }}

- name: Create NPM cache-hash input file
run: |
mkdir -p tmp
jq '{devDependencies, dependencies, engines, gitHubActionCacheKey}' package.json > tmp/package-ci.json
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: tmp/package-ci.json

- run: |
npm run format
git status
git branch -v
- name: Commit and push changes, if any
run: |
git config --local user.email "$USER_EMAIL"
git config --local user.name "$USER_NAME"
if [[ $(git status --porcelain) ]]; then
git add -A
current_branch=$(git rev-parse --abbrev-ref HEAD)
echo current_branch=$current_branch
# gh pr checkout sets some git configs that we can use to make sure
# we push to the right repo & to the right branch
remote_repo=$(git config --get branch.${current_branch}.remote)
echo remote_repo=$remote_repo
remote_branch=$(git config --get branch.${current_branch}.merge)
echo remote_branch=$remote_branch
git commit -m 'Results from /fix:format'
git push ${remote_repo} HEAD:${remote_branch}
else
echo "No changes to commit"
fi
env:
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}

- name: Report an error in the case of failure
if: ${{ failure() || cancelled() }}
run: |
gh pr comment $PR_NUM -b "fix:format run failed, please check $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID for details"
env:
GH_TOKEN: ${{ github.token }}

fix-refcache:
name: /fix:refcache
runs-on: ubuntu-latest

if: |
github.event.issue.pull_request &&
contains(github.event.comment.body, '/fix:refcache')
startsWith(github.event.comment.body, '/fix:')
permissions:
contents: write
pull-requests: write
Expand All @@ -100,6 +26,19 @@ jobs:
DEPTH: --depth 100 # submodule clone depth

steps:
- name: Extract action name
id: extract_action_name
run: |
PR_ACTION=$(echo $COMMENT | grep -oP '/fix:\K\w+')
echo "Action is $PR_ACTION"
ACTION_NAMES="format|submodules|refcache|all"
if [[ ! "$PR_ACTION" =~ ^($ACTION_NAMES)$ ]]; then
echo "Invalid action name: $PR_ACTION"
echo "Action name should be one of: $ACTION_NAMES"
exit 1
fi
echo "PR_ACTION=$PR_ACTION" >> "$GITHUB_ENV"
- name: Context info
run: |
echo $PR_NUM
Expand All @@ -109,12 +48,10 @@ jobs:

- name: Write start comment
run: |
gh pr comment $PR_NUM -b "You triggered fix:refcache action run at $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
gh pr comment $PR_NUM -b "You triggered fix:${PR_ACTION} action run at $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
env:
GH_TOKEN: ${{ github.token }}

# By providing a branch name the checkout will not break if a branch with the
# same name exists already upstream (e.g. patch-X)
- run: gh pr checkout $PR_NUM -b "pr-action-${RANDOM}"
env:
GH_TOKEN: ${{ github.token }}
Expand All @@ -130,9 +67,25 @@ jobs:
cache: npm
cache-dependency-path: tmp/package-ci.json

- run: npm install --omit=optional
- run: |
npm run check:links
case $PR_ACTION in
format)
npm run format
;;
submodules)
npm run sync
;;
refcache)
npm install --omit=optional
npm run check:links
;;
all)
npm install --omit=optional
npm run sync
npm run format
npm run check:links
;;
esac
git status
git branch -v
Expand All @@ -150,7 +103,7 @@ jobs:
echo remote_repo=$remote_repo
remote_branch=$(git config --get branch.${current_branch}.merge)
echo remote_branch=$remote_branch
git commit -m 'Results from /fix:refcache'
git commit -m "Results from /fix:${PR_ACTION}"
git push ${remote_repo} HEAD:${remote_branch}
else
echo "No changes to commit"
Expand All @@ -161,6 +114,6 @@ jobs:
- name: Report an error in the case of failure
if: ${{ failure() || cancelled() }}
run: |
gh pr comment $PR_NUM -b "fix:recache run failed, please check $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID for details"
gh pr comment $PR_NUM -b "fix:${PR_ACTION} run failed, please check $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID for details"
env:
GH_TOKEN: ${{ github.token }}
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[submodule "themes/docsy"]
path = themes/docsy
url = https://github.com/cncf/docsy.git
docsy-pin = v0.8.0-21-g435b2e0
docsy-pin = v0.8.0-49-g621fb34
[submodule "content-modules/opentelemetry-specification"]
path = content-modules/opentelemetry-specification
url = https://github.com/open-telemetry/opentelemetry-specification.git
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ approvers and maintainers while doing code reviews:
[hugo]: https://gohugo.io
[localhost:1313]: http://localhost:1313
[localhost:8888]: http://localhost:8888
[netlify]: https://netlify.com
[new-issue]:
https://github.com/open-telemetry/opentelemetry.io/issues/new/choose
[nodejs-rel]: https://nodejs.org/en/about/previous-releases
Expand Down
4 changes: 4 additions & 0 deletions assets/scss/_external_link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ a.external-link:after {
@include external-link-icon();
}

.td-footer a.external-link:after {
display: none !important;
}

// Can't quite use this yet since (1) breadcrumbs currently use external links,
// (2) we can't currently easily turn this off for footer icons.
//
Expand Down
4 changes: 2 additions & 2 deletions assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@
}
}

.td-page-meta--child {
.td-page-meta__child {
display: none !important;
}

.otel-docs-spec {
.td-page-meta--edit {
.td-page-meta__edit {
display: none !important;
}
}
Expand Down
2 changes: 1 addition & 1 deletion content/en/blog/2022/debug-otel-with-otel/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,5 @@ COPY opentelemetry_module.conf /etc/nginx/conf.d
[v1.0.1 release of the otel-webserver-module]:
https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.1
[java]:
/docs/languages/java/automatic/agent-config/#capturing-http-request-and-response-headers
/docs/languages/java/automatic/configuration/#capturing-http-request-and-response-headers
[python]: /docs/languages/python/automatic/
32 changes: 15 additions & 17 deletions content/en/community/end-user/discussion-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@ Feedback that is shared and collected in these sessions will be routed back to
the relevant project maintainers to help drive prioritization of improvements
and changes to the project.

## New for 2023
## About

- Sessions are now available for all regions!
- You can now find summaries of past discussions every month! Search the blog
for "End-User Discussions".
- Sessions are available for all regions!
- Search the blog for "End-User Discussions" to find summaries of past
discussions.
- A project maintainer and/or a Governance Committee member will be in
attendance at each session to provide additional context, insight, and plans
to user questions and feedback.
- The Chatham House Rule will no longer be applied, and **sessions will be
recorded**. This will help make the feedback more discoverable by the
community.
- Sessions are recorded.

## Upcoming sessions

Expand All @@ -33,19 +31,19 @@ Here are upcoming sessions, or you can view them on the

- **EMEA (Europe, Middle East, and Africa)**: every third Tuesday of the month
at 11AM GMT ([Zoom link](https://us06web.zoom.us/j/85691064809?pwd=c0VCejh))
- August 15
- September 19
- October 17
- February 20
- March 19
- April 16
- **APAC (Asia Pacific)**: every third Wednesday of the month at 11AM India ST
(GMT +5.5), [register](https://lu.ma/1w129wgu) to get the Zoom link
- August 16
- September 20
- October 18
- **AMER (Americas)**: every third Thursday of the month at 9AM PST (GMT -8),
- February 21
- March 20
- April 17
- **AMER (Americas)**: every third Thursday of the month at 9AM PT (GMT -8),
([Zoom link](https://us06web.zoom.us/j/87037874951?pwd=WGo3eUZpeWFZTlhJQXhJeXZhQmwvUT09))
- August 17
- September 21
- October 19
- February 15
- March 21
- April 18

Past topics/questions have included:

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/collector/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Collector
description: Vendor-agnostic way to receive, process and export telemetry data.
aliases: [collector/about]
cascade:
vers: 0.93.0
vers: 0.94.0
weight: 10
---

Expand Down
58 changes: 53 additions & 5 deletions content/en/docs/collector/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,42 @@ cSpell:ignore: cfssl cfssljson fluentforward gencert genkey hostmetrics initca l

<!-- markdownlint-disable link-fragments -->

You can configure the Collector to suit your observability needs. Before you
learn how Collector configuration works, familiarize yourself with the following
content:
You can configure the OpenTelemetry Collector to suit your observability needs.
Before you learn how Collector configuration works, familiarize yourself with
the following content:

- [Data collection concepts][dcc] in order to understand the repositories
applicable to the OpenTelemetry Collector.
- [Data collection concepts][dcc], to understand the repositories applicable to
the OpenTelemetry Collector.
- [Security guidance](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md)

## Location {#location}

By default, the Collector configuration is located in
`/etc/<otel-directory>/config.yaml`, where `<otel-directory>` can be `otelcol`,
`otelcol-contrib`, or another value, depending on the Collector version or the
Collector distribution you're using.

You can provide one or more configurations using the `--config` option. For
example:

```shell
otelcol --config=customconfig.yaml
```

You can also provide configurations using environment variables, YAML paths, or
HTTP URIs. For example:

```shell
otelcol --config=env:MY_CONFIG_IN_AN_ENVVAR` --config=https://server/config.yaml
otelcol --config="yaml:exporters::debug::verbosity: normal"`
```

To validate a configuration file, use the `validate` command. For example:

```shell
otelcol validate --config=customconfig.yaml
```

## Configuration structure {#basics}

The structure of any Collector configuration file consists of four classes of
Expand Down Expand Up @@ -843,3 +871,23 @@ This creates two certificates:
with the associated key in `cert-key.pem`.

[dcc]: /docs/concepts/components/#collector

## Override settings

You can override Collector settings using the `--set` option. The settings you
define with this method are merged into the final configuration after all
`--config` sources are resolved and merged.

The following examples show how to override settings inside nested sections:

```shell
# The following example sets the verbosity
# level of the debug exporter to 'detailed'
otelcol --set "exporters::debug::verbosity=detailed"
# The following example overrides gRPC
# settings for the OTLP receiver
otelcol --set "receivers::otlp::protocols::grpc={endpoint:localhost:4317, compression: gzip}"
```

Note tha the `--set` option doesn't support setting a key that contains a dot or
an equal sign.
2 changes: 1 addition & 1 deletion content/en/docs/concepts/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ For more information, see

### Exporters

{{% docs/languages/exporters-intro all %}}
{{% docs/languages/exporters/intro %}}

### Automatic Instrumentation

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/faas/lambda-auto-instrument.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ variables:
instrumentations, see [Suppressing specific agent instrumentation][1].

[1]:
/docs/languages/java/automatic/agent-config/#suppressing-specific-agent-instrumentation
/docs/languages/java/automatic/configuration/#suppressing-specific-agent-instrumentation

For example, to only enable auto-instrumentation for Lambda and the AWS SDK, you
would set the following environment variables:
Expand Down
Loading

0 comments on commit 8c6a77a

Please sign in to comment.