Skip to content

Commit

Permalink
Merge pull request open-telemetry#2 from hdost/add-original-code
Browse files Browse the repository at this point in the history
Add Code From open-telemetry/opentelemetry-rust
  • Loading branch information
hdost authored Nov 12, 2023
2 parents 22e0e11 + e60c227 commit c82fddc
Show file tree
Hide file tree
Showing 131 changed files with 18,220 additions and 7 deletions.
89 changes: 89 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// http://cspell.org/configuration/
{
"version": "0.2",
"language": "en,en-US",
"useGitignore": true,
"minWordLength": 4,
"ignorePaths": [
"target/**"
],
// list of words to be ignored. unlike `words` below, these won't be
// suggested as corrections for misspelled words.
"ignoreWords": [
"otel",
"rustdoc",
"rustfilt"
],
// these are words that are always considered incorrect.
"flagWords": [
"recieve",
"reciever",
"seperate",
"hte",
"teh"
],
// these are words that are always correct and can be thought of as our
// workspace dictionary.
"words": [
"actix",
"appender",
"appenders",
"Bhasin",
"Cijo",
"codecov",
"deque",
"Dirkjan",
"hasher",
"isahc",
"Isobel",
"jaegertracing",
"Kühle",
"Kumar",
"Lalit",
"msrv",
"Ochtman",
"openetelemetry",
"opentelemetry",
"OTLP",
"protoc",
"quantile",
"Redelmeier",
"reqwest",
"rustc",
"Tescher",
"Zhongyang",
"zipkin"
],
"enabledLanguageIds": [
"jsonc",
"markdown",
"plaintext",
"rust",
"shellscript"
],
"languageSettings": [
{
"languageId": "jsonc",
"includeRegExpList": [
"CStyleComment"
]
},
{
"languageId": "markdown",
"caseSensitive": false
},
{
"languageId": "rust",
"includeRegExpList": [
"CStyleComment",
"strings"
]
},
{
"languageId": "shellscript",
"includeRegExpList": [
"/#.*/g"
]
}
]
}
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/
56 changes: 56 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG-REPORT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Bug Report
description: File a bug report
title: "[Bug]: "
labels: ["bug", "triage:todo"]
projects: ["open-telemetry/opentelemetry-rust-contrib"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
value: "A bug happened!"
validations:
required: true
- type: textarea
id: api-version
attributes:
label: API Version
description: What version of the OpenTelemetry API are you using?
placeholder: 0.x, 1.x, etc.
validations:
required: true
- type: textarea
id: sdk-version
attributes:
label: SDK Version
description: What version of the OpenTelemetry SDK are you using?
placeholder: 0.x, 1.x, etc.
validations:
required: true
- type: dropdown
id: components
attributes:
label: What component are you working with?
multiple: true
options:
- opentelemetry-aws
- opentelemetry-contrib
- opentelemetry-datadog
- opentelemetry-dynatrace
- opentelemetry-stackdriver
- opentelemetry-user-events-logs
- opentelemetry-user-events-metrics
- opentelemetry-zpages
- N/A
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
63 changes: 63 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
name: "Feature Request"
description: Request a feature for the OpenTelemetry Rust implementation.
title: "[Feature]: "
labels: ["enhancement", "triage:todo"]
projects: ["open-telemetry/opentelemetry-rust-contrib"]
body:
- type: markdown
attributes:
value: |
Thanks for using our library and trying to make it better!
Before opening a feature request against this repo, consider whether the feature
should/could be implemented in the [other OpenTelemetry client
libraries](https://github.com/open-telemetry/). If so, please [open an issue on
opentelemetry-specification](https://github.com/open-telemetry/opentelemetry-specification/issues/new) first.
- type: textarea
id: related-problem
attributes:
label: Related Problems?
description: Is your feature request related to a problem? If so, provide a concise description of the problem.
placeholder: Include the Issue ID from this or other repos.
validations:
required: false
- type: dropdown
id: components
attributes:
label: What component are you working with?
multiple: true
options:
- opentelemetry-aws
- opentelemetry-contrib
- opentelemetry-datadog
- opentelemetry-dynatrace
- opentelemetry-stackdriver
- opentelemetry-user-events-logs
- opentelemetry-user-events-metrics
- opentelemetry-zpages
- N/A
- type: textarea
id: solution
attributes:
label: "Describe the solution you'd like:"
description: What do you want to happen instead? What is the expected behavior?
placeholder: I'd like the api to ...
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Considered Alternatives
description: Which alternative solutions or features have you considered?
placeholder: Some potential solutions
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Add any other context about the feature request here.
placeholder: Some related requests in other project or upstream spec proposals.
validations:
required: false
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
contact_links:
- name: GitHub Discussions
url: https://github.com/open-telemetry/opentelemetry-rust-contrib/discussions/new/choose
about: Please ask questions here.
- name: Slack
url: https://cloud-native.slack.com/archives/C03GDP0H023
about: Or the `#otel-rust` channel in the CNCF Slack instance. (Not terribly responsive.)
- name: "⚠️ Report a security vulnerability"
url: "https://github.com/open-telemetry/opentelemetry-rust-contrib/security/advisories/new"
about: "Report a security vulnerability."

13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Fixes #
Design discussion issue (if applicable) #

## Changes

Please provide a brief description of the changes here.

## Merge requirement checklist

* [ ] [CONTRIBUTING](https://github.com/open-telemetry/opentelemetry-rust/blob/main/CONTRIBUTING.md) guidelines followed
* [ ] Unit tests added/updated (if applicable)
* [ ] Appropriate `CHANGELOG.md` files updated for non-trivial, user-facing changes
* [ ] Changes in public API reviewed (if applicable)
30 changes: 30 additions & 0 deletions .github/codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
codecov:
require_ci_to_pass: yes

coverage:
precision: 1
round: down
range: "50...100"
status:
project:
default:
target: auto
threshold: 0.5%

ignore:
- "opentelemetry/src/testing" # test harnesses
- "opentelemetry-jaeger/src/testing" # test harness
- "opentelemetry-jaeger/src/exporter/thrift" # auto generated files
- "opentelemetry-otlp/src/proto" # auto generated files
- "opentelemetry-proto/src/proto" # auto generated files
# examples below
- "examples"
- "opentelemetry-jaeger/examples"
- "opentelemetry-zipkin/examples"
- "opentelemetry-otlp/examples"
- "opentelemetry-aws/examples"
- "opentelemetry-datadog/examples"
- "opentelemetry-dynatrace/examples"
- "opentelemetry-http/examples"
- "opentelemetry-prometheus/examples"
- "opentelemetry-zpages/examples"
119 changes: 119 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: CI
env:
CI: true
on:
pull_request:
push:
branches:
- main
paths-ignore:
- '**.md'
jobs:
test:
strategy:
matrix:
rust: [stable, beta]
runs-on: ubuntu-latest
steps:
- name: Free disk space
run: |
df -h
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet
df -h
- uses: actions/checkout@v1
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
components: rustfmt
profile: minimal
- uses: arduino/setup-protoc@v1
- name: Test
run: ./scripts/test.sh
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
profile: minimal
- uses: arduino/setup-protoc@v1
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Lint
run: ./scripts/lint.sh
# TODO: re-add this test
# msrv:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# with:
# submodules: true
# - uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: 1.65.0
# override: true
# - name: Patch dependencies versions # some dependencies bump MSRV without major version bump
# run: ./scripts/patch_dependencies.sh
# - name: Run tests
# run: cargo --version &&
# cargo test --manifest-path=opentelemetry/Cargo.toml --features trace,metrics,testing &&
# cargo test --manifest-path=opentelemetry-jaeger/Cargo.toml --features rt-tokio &&
# cargo test --manifest-path=opentelemetry-zipkin/Cargo.toml
cargo-deny:
runs-on: ubuntu-latest
continue-on-error: true # Prevent sudden announcement of a new advisory from failing ci
steps:
- uses: actions/checkout@v2
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check advisories
docs:
continue-on-error: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt
override: true
- uses: arduino/setup-protoc@v1
- name: doc
run: cargo doc --no-deps --all-features
env:
CARGO_INCREMENTAL: '0'
RUSTDOCFLAGS: -Dwarnings
coverage:
continue-on-error: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt,llvm-tools-preview
override: true
- uses: arduino/setup-protoc@v1
- name: cargo install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: cargo llvm-cov
run: cargo llvm-cov --locked --all-features --workspace --lcov --output-path lcov.info
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
Loading

0 comments on commit c82fddc

Please sign in to comment.