Skip to content

Commit

Permalink
Merge branch 'main' into svrnm-patch-6
Browse files Browse the repository at this point in the history
  • Loading branch information
svrnm authored Jul 31, 2024
2 parents b688b64 + edceefe commit 0066e32
Show file tree
Hide file tree
Showing 214 changed files with 680 additions and 238 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/check-registry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Registry Validation

on:
pull_request:
# Make sure this only runs when registry entries are touched.
paths:
- 'data/registry/**'

jobs:
registry-validation:
name: REGISTRY validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create and use reduced-dependencies package.json
run: |
mkdir -p tmp
jq '.devDependencies |= with_entries(
select(.key | test("gulp|markdown|through|require|yargs|js-yaml|ajv|ajv-formats|ajv-errors"))
)
| del(.dependencies, .optionalDependencies)' \
package.json > tmp/package-ci.json
cp tmp/package-ci.json package.json
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: tmp/package-ci.json
- run: npm install --ignore-scripts --omit=optional
- run: npm run check:registry
2 changes: 1 addition & 1 deletion .github/workflows/check-text.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: |
mkdir -p tmp
jq '.devDependencies |= with_entries(
select(.key | test("gulp|markdown|through|require|yargs"))
select(.key | test("gulp|markdown|through|require|yargs|js-yaml|ajv|ajv-formats|ajv-errors"))
)
| del(.dependencies, .optionalDependencies)' \
package.json > tmp/package-ci.json
Expand Down
69 changes: 37 additions & 32 deletions content/en/docs/zero-code/python/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,25 @@ opentelemetry-bootstrap -a install
The `opentelemetry-distro` package installs the API, SDK, and the
`opentelemetry-bootstrap` and `opentelemetry-instrument` tools.

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

You must install a distro package to get auto instrumentation working. The
`opentelemetry-distro` package contains the default distro to automatically
configure some of the common options for users. For more information, see
[OpenTelemetry distro](/docs/languages/python/distro/).

{{% /alert %}}

The `opentelemetry-bootstrap -a install` command reads through the list of
packages installed in your active `site-packages` folder, and installs the
corresponding instrumentation libraries for these packages, if applicable. For
example, if you already installed the `flask` package, running
`opentelemetry-bootstrap -a install` will install
`opentelemetry-instrumentation-flask` for you.

> **NOTE:** If you leave out `-a install`, the command will simply list out the
> recommended instrumentation libraries to be installed. More information can be
> found
> [here](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/opentelemetry-instrumentation#opentelemetry-bootstrap).
Running `opentelemetry-bootstrap` without arguments lists the recommended
instrumentation libraries to be installed. For more information, see
[`opentelemetry-bootstrap`](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/opentelemetry-instrumentation#opentelemetry-bootstrap).

## Configuring the agent

Expand All @@ -42,7 +50,7 @@ The agent is highly configurable.
One option is to configure the agent by way of configuration properties from the
CLI:

```console
```sh
opentelemetry-instrument \
--traces_exporter console,otlp \
--metrics_exporter console \
Expand All @@ -53,7 +61,7 @@ opentelemetry-instrument \

Alternatively, you can use environment variables to configure the agent:

```console
```sh
OTEL_SERVICE_NAME=your-service-name \
OTEL_TRACES_EXPORTER=console,otlp \
OTEL_METRICS_EXPORTER=console \
Expand All @@ -71,44 +79,41 @@ A number of popular Python libraries are auto-instrumented, including
[Flask](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-flask)
and
[Django](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-django).
You can find the full list
[here](/ecosystem/registry/?language=python&component=instrumentation).
For the full list, see the
[Registry](/ecosystem/registry/?language=python&component=instrumentation).

## Troubleshooting

### Python package installation failure

The Python package installs require `gcc` and `gcc-c++`, which you may need to
install if you’re running a slim version of Linux (e.g., CentOS).

CentOS:

```console
yum -y install python3-devel
yum -y install gcc-c++
```

Debian/Ubuntu:

```console
apt install -y python3-dev
apt install -y build-essential
```

Alpine:

```console
apk add python3-dev
apk add build-base
```
install if you’re running a slim version of Linux, such as CentOS.

<!-- markdownlint-disable blanks-around-fences -->

- CentOS
```sh
yum -y install python3-devel
yum -y install gcc-c++
```
- Debian/Ubuntu
```sh
apt install -y python3-dev
apt install -y build-essential
```
- Alpine
```sh
apk add python3-dev
apk add build-base
```

### gRPC Connectivity

To debug Python gRPC connectivity issues, set the following gRPC debug
environment variables:

```console
```sh
export GRPC_VERBOSITY=debug
export GRPC_TRACE=http,call_error,connectivity_state
opentelemetry-instrument python <your_app>.py
opentelemetry-instrument python YOUR_APP.py
```
2 changes: 1 addition & 1 deletion content/zh/docs/what-is-opentelemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ OpenTelemetry 被设计为可扩展的。一些扩展 OpenTelemetry 的例子包
## 历史 {#history}

OpenTelemetry 是[云原生计算基金会 (CNCF)](https://www.cncf.io)的一个项目,是由
OpenTracing 和 OpenCensus 项目合并而诞生的。OpenTracing 和 OpenCensus 这两个项目合并而成的。原来这两个项目都是为解决同样的问题而创建的:
OpenTracing 和 OpenCensus 项目合并而成的。原来这两个项目都是为解决同样的问题而创建的:
缺乏一种标准的方法来为代码进行仪表化并将遥测数据发送到可观测性后端。
由于这两个项目都无法独立解决这个问题,所以将其合并成立了 OpenTelemetry,
吸收了双方的优势,提供了统一的解决方案。
Expand Down
188 changes: 188 additions & 0 deletions data/registry-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://opentelemetry.io/ecosystem/registry/schema.json",
"$comment": "https://opentelemetry.io/ecosystem/registry/adding/",
"description": "A schema for entries in the OpenTelemetry registry",
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The title of the entry",
"errorMessage": "The title of the entry must be a string and can not be empty",
"minLength": 1
},
"registryType": {
"type": "string",
"description": "The type of the entry",
"enum": [
"core",
"exporter",
"extension",
"instrumentation",
"log-bridge",
"processor",
"receiver",
"resource-detector",
"utilities"
]
},
"language": {
"type": "string",
"description": "The programming language of the entry",
"examples": ["collector"]
},
"description": {
"type": "string",
"description": "A description of the entry",
"errorMessage": "The description of the entry must be a string and can not be empty"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of tags for the entry",
"uniqueItems": true
},
"license": {
"type": "string",
"description": "The license of the entry",
"examples": ["Apache 2.0", "MIT"]
},
"createdAt": {
"type": "string",
"description": "The date the entry was created",
"format": "date"
},
"authors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"oneOf": [
{
"pattern": "OpenTelemetry Authors",
"errorMessage": "The name of the author can not contain 'OpenTelemetry' except for 'OpenTelemetry Authors'"
},
{
"pattern": "^(?!.*OpenTelemetry).*$"
}
],
"description": "The name of the author",
"errorMessage": "The name of the author must be a string"
},
"email": {
"type": "string",
"description": "The email address of the author",
"format": "email"
},
"url": {
"type": "string",
"description": "The URL of the author",
"pattern": "^https:\\/\\/github\\.com\\/([a-zA-Z0-9](?:-?[a-zA-Z0-9]){0,38})$",
"errorMessage": "The URL of the author must be a valid GitHub user URL"
}
},
"if": {
"properties": {
"name": {
"const": "OpenTelemetry Authors"
}
}
},
"then": {
"required": ["name"]
},
"else": {
"required": ["name"],
"anyOf": [
{
"required": ["email"]
},
{
"required": ["url"]
}
],
"errorMessage": "An author must have an email or a URL"
},
"additionalProperties": false
},
"description": "A list of authors of the entry",
"minItems": 1
},
"urls": {
"type": "object",
"properties": {
"repo": {
"type": "string",
"description": "The URL of the repository"
},
"docs": {
"type": "string",
"description": "The URL of the documentation"
}
},
"required": ["repo"],
"additionalProperties": false
},
"package": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the package"
},
"version": {
"type": "string",
"description": "The version of the package"
},
"registry": {
"type": "string",
"description": "The registry of the package",
"enum": [
"crates",
"npm",
"pip",
"gems",
"maven",
"nuget",
"packagist",
"go",
"go-collector",
"hex"
]
},
"quickInstall": {
"type": "boolean",
"description": "A flag to indicate if a quick install can be shown"
}
},
"required": ["name", "registry"],
"additionalProperties": false
},
"deprecated": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "The reason for deprecation",
"errorMessage": "The reason for deprecation must be a string and can not be empty"
}
},
"required": ["reason"],
"additionalProperties": false
},
"isNative": {
"type": "boolean",
"description": "A flag to indicate if the entry is native"
},
"isFirstParty": {
"type": "boolean",
"description": "A flag to indicate if the entry is first party"
}
},
"additionalProperties": false,
"required": ["title", "description", "urls", "authors"]
}
2 changes: 1 addition & 1 deletion data/registry/collector-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ createdAt: 2023-12-18
package:
registry: go
name: go.opentelemetry.io/collector/cmd/builder
version: v0.105.0
version: v0.106.1
quickInstall: false
2 changes: 1 addition & 1 deletion data/registry/collector-exporter-alertmanager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ authors:
package:
registry: go-collector
name: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alertmanagerexporter
version: v0.105.0
version: v0.106.0
urls:
repo: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/alertmanagerexporter
createdAt: 2023-12-05
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ createdAt: 2021-02-24
package:
registry: go-collector
name: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter
version: v0.105.0
version: v0.106.0
2 changes: 1 addition & 1 deletion data/registry/collector-exporter-aws-xray.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ createdAt: 2020-06-06
package:
registry: go-collector
name: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter
version: v0.105.0
version: v0.106.0
2 changes: 1 addition & 1 deletion data/registry/collector-exporter-awscloudwatchlogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ createdAt: 2020-11-05
package:
registry: go-collector
name: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter
version: v0.105.0
version: v0.106.0
2 changes: 1 addition & 1 deletion data/registry/collector-exporter-awsemf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ createdAt: 2020-06-06
package:
registry: go-collector
name: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter
version: v0.105.0
version: v0.106.0
Loading

0 comments on commit 0066e32

Please sign in to comment.