Skip to content

Commit

Permalink
Merge branch 'main' into issue_3683
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl authored Feb 3, 2024
2 parents e8546ca + 03f20df commit 26b1312
Show file tree
Hide file tree
Showing 421 changed files with 3,928 additions and 1,982 deletions.
4 changes: 4 additions & 0 deletions .cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ languageSettings:
- CodeBlock
words:
- accountingservice
- actix
- adservice
- alibaba
- Alloc
Expand All @@ -32,6 +33,8 @@ words:
- appender
- appenders
- aspecto
- autoconfigure
- autoconfiguration
- autoload
- autoloaded
- autoloader
Expand All @@ -42,6 +45,7 @@ words:
- cartservice
- cassandra
- checkoutservice
- classpath
- cncf
- currencyservice
- daemonset
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ content/en/docs/kubernetes/helm/ @open-telemetry/docs-approvers @open-te
content/en/docs/specs/ @open-telemetry/docs-approvers @open-telemetry/specs-approvers
content/en/docs/security/ @open-telemetry/docs-approvers @open-telemetry/sig-security-maintainers
content/en/ecosystem/demo/ @open-telemetry/demo-approvers @open-telemetry/demo-approvers
content/en/docs/contributing/ @open-telemetry/docs-approvers @open-telemetry/docs-maintainers
30 changes: 30 additions & 0 deletions .github/workflows/auto-update-registry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Auto-update registry versions

on:
workflow_dispatch:
schedule:
# At 04:31, every day
- cron: 31 4 * * *

jobs:
auto-update-versions:
name: Auto-update registry versions
runs-on: ubuntu-20.04
# Remove the if statement below when testing againt a fork
if: github.repository == 'open-telemetry/opentelemetry.io'
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use CLA approved github bot
run: |
git config user.name opentelemetrybot
git config user.email [email protected]
- name: Auto-update
run: |
.github/workflows/scripts/update-registry-versions.sh
env:
# change this to secrets.GITHUB_TOKEN when testing against a fork
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
12 changes: 2 additions & 10 deletions .github/workflows/auto-update-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-20.04
if: github.repository == 'open-telemetry/opentelemetry.io'
env:
DEPTH: --depth 100 # submodule clone depth
DEPTH: --depth 500 # submodule clone depth

steps:
- name: Checkout
Expand All @@ -23,15 +23,7 @@ jobs:
git config user.name opentelemetrybot
git config user.email [email protected]
- name: Auto-update
run: |
.github/workflows/scripts/auto-update-version.sh opentelemetry-collector-releases vers content/en/docs/collector/_index.md
.github/workflows/scripts/auto-update-version.sh opentelemetry-java otel content/en/docs/instrumentation/java/_index.md
.github/workflows/scripts/auto-update-version.sh opentelemetry-java-instrumentation instrumentation content/en/docs/instrumentation/java/_index.md
.github/workflows/scripts/auto-update-version.sh opentelemetry-specification spec scripts/content-modules/adjust-pages.pl
.github/workflows/scripts/auto-update-version.sh opentelemetry-proto otlp scripts/content-modules/adjust-pages.pl
.github/workflows/scripts/auto-update-version.sh semantic-conventions semconv scripts/content-modules/adjust-pages.pl
.github/workflows/scripts/auto-update-version.sh semantic-conventions-java semconv content/en/docs/instrumentation/java/_index.md
- run: ./scripts/auto-update/all-versions.sh
env:
# change this to secrets.GITHUB_TOKEN when testing against a fork
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
121 changes: 121 additions & 0 deletions .github/workflows/scripts/update-registry-versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
#!/bin/bash -e

UPDATE_YAML="yq eval -i"
GIT=git
GH=gh
FILES="${FILES:-./data/registry/*.yml}"


if [[ -n "$GITHUB_ACTIONS" ]]; then
# Ensure that we're starting from a clean state
git reset --hard origin/main
elif [[ "$1" != "-f" ]]; then
# Do a dry-run when script it executed locally, unless the
# force flag is specified (-f).
echo "Doing a dry-run when run locally. Use -f as the first argument to force execution."
UPDATE_YAML="yq eval"
GIT="echo > DRY RUN: git "
GH="echo > DRY RUN: gh "
else
# Local execution with -f flag (force real vs. dry run)
shift
fi

body=""

for yaml_file in ${FILES}; do
echo $yaml_file
# Check if yq is installed
if ! command -v yq &> /dev/null; then
echo "yq could not be found, please install yq."
exit 1
fi

# Function to get latest version based on registry
get_latest_version() {
package_name=$1
registry=$2

case $registry in
npm)
curl -s "https://registry.npmjs.org/${package_name}/latest" | jq -r '.version'
;;
packagist)
curl -s "https://repo.packagist.org/p2/${package_name}.json" | jq -r ".packages.\"${package_name}\"[0].version"
;;
gems)
curl -s "https://rubygems.org/api/v1/versions/${package_name}/latest.json" | jq -r '.version'
;;
go)
go list -m --versions "$package_name" | awk '{ if (NF > 1) print $NF ; else print "" }'
;;
go-collector)
go list -m --versions "$package_name" | awk '{ if (NF > 1) print $NF ; else print "" }'
;;
nuget)
lower_case_package_name=$(echo "$package_name" | tr '[:upper:]' '[:lower:]')
curl -s "https://api.nuget.org/v3/registration5-gz-semver2/${lower_case_package_name}/index.json" | gunzip | jq -r '.items[0].upper'
;;
hex)
curl -s "https://hex.pm/api/packages/$package_name" | jq -r '.releases | max_by(.inserted_at) | .version'
;;
*)
echo "Registry not supported."
;;
esac
}

# Read package details
name=$(yq eval '.package.name' "$yaml_file")
registry=$(yq eval '.package.registry' "$yaml_file")
current_version=$(yq eval '.package.version' "$yaml_file")

if [ -z "$name" ] || [ -z "$registry" ]; then
echo "${yaml_file}: Package name and/or registry are missing in the YAML file."
else
# Get latest version
latest_version=$(get_latest_version "$name" "$registry")

if [ "$latest_version" == "Registry not supported." ]; then
echo "${yaml_file} ($registry): Registry not supported.";
elif [ -z "$latest_version" ]; then
echo "${yaml_file} ($registry): Could not get latest version from registry."
elif [ -z "$current_version" ]; then
${UPDATE_YAML} ".package.version = \"$latest_version\"" $yaml_file
row="${yaml_file} ($registry): Version field was missing. Populated with the latest version: $latest_version"
echo "${row}"
body="${body}\n- ${row}"
elif [ "$latest_version" != "$current_version" ]; then
${UPDATE_YAML} ".package.version = \"$latest_version\"" "$yaml_file"
row="($registry): Updated version from $current_version to $latest_version in $yaml_file"
echo "${yaml_file} ${row}"
body="${body}\n- ${row}"
else
echo "${yaml_file} ($registry): Version is already up to date."
fi
fi
done;

# We use the sha1 over all version updates to uniquely identify the PR.
tag=$(echo "${body}" | sha1sum | awk '{print $1;}')
message="Auto-update registry versions (${tag})"
branch="opentelemetrybot/auto-update-registry-${tag}"


existing_pr_count=$(gh pr list --state all --search "in:title $message" | wc -l)
if [ "$existing_pr_count" -gt 0 ]; then
echo "PR(s) already exist for '$message'"
gh pr list --state all --search "\"$message\" in:title"
echo "So we won't create another. Exiting."
exit 0
fi

$GIT checkout -b "$branch"
$GIT commit -a -m "$message"
$GIT push --set-upstream origin "$branch"

body_file=$(mktemp)
echo -en "${body}" >> "${body_file}"

echo "Submitting auto-update PR '$message'."
$GH pr create --title "$message" --body-file "${body_file}"
7 changes: 6 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
[submodule "themes/docsy"]
path = themes/docsy
url = https://github.com/cncf/docsy.git
branch = opentelemetry.io
docsy-pin = v0.8.0-21-g435b2e0
[submodule "content-modules/opentelemetry-specification"]
path = content-modules/opentelemetry-specification
url = https://github.com/open-telemetry/opentelemetry-specification.git
spec-pin = v1.29.0
[submodule "content-modules/community"]
path = content-modules/community
url = https://github.com/open-telemetry/community
community-pin = 4e0d748
[submodule "content-modules/opentelemetry-proto"]
path = content-modules/opentelemetry-proto
url = https://github.com/open-telemetry/opentelemetry-proto
otlp-pin = v1.1.0
[submodule "content-modules/semantic-conventions"]
path = content-modules/semantic-conventions
url = https://github.com/open-telemetry/semantic-conventions
semconv-pin = v1.24.0
[submodule "content-modules/opamp-spec"]
path = content-modules/opamp-spec
url = https://github.com/open-telemetry/opamp-spec
opamp-pin = v0.8.0-5-g0360da8
10 changes: 9 additions & 1 deletion .htmltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ IgnoreURLs: # list of regexs of paths or URLs to be ignored
# Sites that deny access, always yielding 401, 403 Forbidden, 406, or other:
- ^https://(www\.)?linkedin\.com\b # 999 Request Denied
- ^https://(www\.)?mvnrepository\.com
- ^https://eng.uber.com/flipr/ # 406
- ^https://(www\.|eng\.)?uber\.com/(blog|flipr)/ # 406
- ^https://twitter.com
- ^https://www.chathamhouse.org
- ^https://www.zocdoc.com
Expand Down Expand Up @@ -59,3 +59,11 @@ IgnoreURLs: # list of regexs of paths or URLs to be ignored
- ^https://oncallmemaybe.com
# TODO drop after https://github.com/open-telemetry/opentelemetry-specification/pull/3834 is merged
- ^https://wikipedia\.org/wiki/Monotonic_function
# TODO drop after https://github.com/open-telemetry/opamp-spec/pull/179 is merged into this repo
- ^http://www.watersprings.org/
# TODO move into content/en/blog/2023/humans-of-otel.md once https://github.com/open-telemetry/opentelemetry.io/issues/3889 is implemented
- ^https://shorturl.at/osHRX$
# TODO drop after https://github.com/open-telemetry/semantic-conventions/pull/678 is merged:
- ^https://wikipedia.org/wiki/(S.M.A.R.T|Hop_)
# TODO move into content/en/blog/2023/contributing-to-otel/index.md once https://github.com/open-telemetry/opentelemetry.io/issues/3889 is implemented
- ^https://shorturl.at/vLYZ0$
4 changes: 4 additions & 0 deletions .textlintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ rules:
defaultTerms: false
skip: []
terms:
- Actix
- Ajax
- Apache
- API
Expand Down Expand Up @@ -112,6 +113,9 @@ rules:
# https://github.com/sapegin/textlint-rule-terminology/blob/ca36a645c56d21f27cb9d902b5fb9584030c59e3/index.js#L137-L142.
#
- ['3rd[- ]party', third-party]
- ['auto[- ]c(onfigur)(es?|ations?)', 'autoc$1$2'] # cspell:ignore autoc ations onfigur
- ['back[- ]end(s)?', 'backend$1']
- ['bugfix', 'bug fix']
- [cpp, C++]
- # dotnet|.net -> .NET, but NOT for strings like:
# - File extension: file.net
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ is hosted on [Netlify][].
## Get involved

To learn how to contribute fixes and new content to this project, read the
[Contributor's guide](/content/en/docs/contributing), which includes a style
guide and useful information on the review process.
[Contributor's guide](https://opentelemetry.io/docs/contributing/), which
includes a style guide and useful information on the review process.

If you are new to OpenTelemetry and just get started with it, you are in a
perfect position to help us get better: the website and documentation is the
Expand All @@ -18,7 +18,7 @@ missing [let us know][].
### Submit a blog post

For guidance on how to write and submit a blog post, see
[Submit a blog post](/content/en/docs/contributing/blog).
[Submit a blog post](https://opentelemetry.io/docs/contributing/blog/).

### Add a project to the OpenTelemetry [Registry]

Expand Down
6 changes: 3 additions & 3 deletions content/en/blog/2022/apisix/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ and sends it to OpenTelemetry Collector through HTTP protocol. Apache APISIX
starts to support this feature in v2.13.0.

One of OpenTelemetry's special features is that the agent/SDK of OpenTelemetry
is not locked with back-end implementation, which gives users flexibilities on
choosing their own back-end services. In other words, users can choose the
is not locked with backend implementation, which gives users flexibilities on
choosing their own backend services. In other words, users can choose the
backend services they want, such as Zipkin and Jaeger, without affecting the
application side.

Expand Down Expand Up @@ -192,7 +192,7 @@ resulting in a call chain consisting of two spans.
### Step 1: Deploy OpenTelemetry

The following uses `docker compose` as an example. For other deployments, see
[Getting Started](/docs/collector/getting-started/).
[Quick start](/docs/collector/quick-start/).

You can see the following command to deploy[^1]:

Expand Down
8 changes: 4 additions & 4 deletions content/en/blog/2022/frontend-overhaul/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ This proposal was presented to the OpenTelemetry demo SIG during one of the
weekly Monday meetings and we were given the green light to move ahead. As part
of the changes, we decided to use [Next.js](https://nextjs.org/) to not only
work as the primary front-end application but also to work as an aggregation
layer between the front-end and the gRPC back-end services.
layer between the front-end and the gRPC backend services.

![New Front-end Data Flow](data-flow.png)

As you can see in the diagram, the application has two major connectivity
points, one coming from the browser side (REST) to connect to the Next.js
aggregation layer and the other from the aggregation layer to the back-end
aggregation layer and the other from the aggregation layer to the backend
services (gRPC).

## OpenTelemetry Instrumentation
Expand All @@ -129,7 +129,7 @@ The next big thing we worked was a way to instrument both sides of the Next.js
app. To do this we had to connect the app twice to the same collector used by
all the microservices.

A simple back-end solution was designed using the
A simple backend solution was designed using the
[official gRPC exporter](https://www.npmjs.com/package/@opentelemetry/exporter-trace-otlp-grpc)
in combination with the
[Node.js SDK](https://www.npmjs.com/package/@opentelemetry/sdk-node).
Expand Down Expand Up @@ -160,7 +160,7 @@ CORS requests from the web app.

Once the setup is complete, by loading the application from Docker and
interacting with the different features, we can start looking at the full traces
that begin from the front-end user events all the way to the back-end gRPC
that begin from the front-end user events all the way to the backend gRPC
services.

![Front-end Trace Jaeger Visualization](jaeger.png)
Expand Down
Loading

0 comments on commit 26b1312

Please sign in to comment.