Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: OTLP Log Record Exporter #12

Closed
wants to merge 35 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d44183d
feat: Create OTLP Logs Exporter
kaylareopelle Aug 26, 2024
ee8cda1
test: Skip intermittently failing test
kaylareopelle Sep 12, 2024
a64bdaa
ci: Add OTLP logs exporter to CI
kaylareopelle Sep 12, 2024
112cd21
test: Skip intermittent failure
kaylareopelle Sep 12, 2024
41d32fd
test: Client cert fixes
kaylareopelle Sep 13, 2024
7cba668
chore: Readme updates
kaylareopelle Sep 13, 2024
cdce3cc
Adds on_ending callback to allow processors to mutate spans before En…
pantuza Oct 1, 2024
3c356fc
test: Fix intermittent test failures (#1730)
kaylareopelle Oct 1, 2024
b0ecc1c
fix: update references to logging exporter (#1731)
codeboten Oct 1, 2024
6c9c771
chore: promote kaylareopelle to maintainer (#1745)
mwear Oct 10, 2024
7aa9c11
feat: add basic metrics view (#1604)
xuan-cao-swi Oct 11, 2024
c469bb5
feat: Add log record attribute limits (#1696)
kaylareopelle Oct 11, 2024
75502b6
fix: add mTLS for metrics exporter (#1712)
xuan-cao-swi Oct 11, 2024
15b39ff
ci: Add conventional commits validation (#1693)
kaylareopelle Oct 11, 2024
bcd4041
Merge branch 'main' into otlp-log-record-exporter
kaylareopelle Oct 15, 2024
1e6545d
Merge branch 'otlp-log-record-exporter' of github.com:kaylareopelle/o…
kaylareopelle Oct 15, 2024
18ec40f
ci: Exclude otlp-logs from JRuby CI, alphabetize
kaylareopelle Oct 15, 2024
044336d
fix: Coerce aggregation_temporality to symbol (#1741)
kaylareopelle Oct 16, 2024
cb05fa5
Update Instrument validation and move to SDK (#1735)
xuan-cao-swi Oct 16, 2024
4c9f7e1
fix: add warning if invalid meter name given (#1734)
xuan-cao-swi Oct 16, 2024
a1bcf49
docs: Update README to use logs URL
kaylareopelle Oct 17, 2024
385ed1d
chore: Add tiny version to Appraisal
kaylareopelle Oct 17, 2024
f8ead31
chore: Update google-protobuf version, Appraisals
kaylareopelle Oct 22, 2024
4dc0f9f
chore: Rubocop single quotes over double quotes
kaylareopelle Oct 22, 2024
0c372cd
test: Resolve Truffle ruby intermittent failures on exporters (#1752)
kaylareopelle Oct 22, 2024
555b062
release: Release 2 gems (#1754)
github-actions[bot] Oct 22, 2024
e7af001
test: Add minitest-stub-const
kaylareopelle Oct 31, 2024
abfcd54
feat: Add log output for send_bytes failure cases
kaylareopelle Oct 31, 2024
be01344
test: Add workaround for windows test failure (#1751)
kaylareopelle Nov 15, 2024
6fbbce6
Merge branch 'main' into otlp-log-record-exporter
kaylareopelle Nov 16, 2024
aa6ecce
feat: OpenTelemetry.logger_provider API, ProxyLoggers, Configuration,…
kaylareopelle Nov 18, 2024
d60e3a7
feat: Update metrics configuration patch (#1548)
kaylareopelle Nov 18, 2024
60c0021
chore: Remove outdated :exception kwarg
kaylareopelle Nov 18, 2024
77192b5
test: Loosen message match for SystemCallError
kaylareopelle Nov 18, 2024
09ad663
Merge branch 'main' into otlp-log-record-exporter
kaylareopelle Nov 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .commit-me.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"include-pull-requests": true,
"types": [ "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "release", "revert", "squash", "style", "test" ]
}
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ jobs:
- opentelemetry-exporter-otlp-grpc
- opentelemetry-exporter-otlp-http
- opentelemetry-exporter-zipkin
- opentelemetry-exporter-otlp-logs
- opentelemetry-exporter-otlp-metrics
os:
- ubuntu-latest
Expand Down Expand Up @@ -134,8 +135,9 @@ jobs:
echo "skip=false" >> $GITHUB_OUTPUT
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp" ]] && echo "skip=true" >> $GITHUB_OUTPUT
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-common" ]] && echo "skip=true" >> $GITHUB_OUTPUT
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-http" ]] && echo "skip=true" >> $GITHUB_OUTPUT
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-grpc" ]] && echo "skip=true" >> $GITHUB_OUTPUT
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-http" ]] && echo "skip=true" >> $GITHUB_OUTPUT
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-logs" ]] && echo "skip=true" >> $GITHUB_OUTPUT
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-metrics" ]] && echo "skip=true" >> $GITHUB_OUTPUT
# This is essentially a bash script getting evaluated, so we need to return true or the whole job fails.
true
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Conventional Commits Validation

on:
workflow_dispatch:
pull_request:
types:
- opened
- synchronize
- reopened
- edited

permissions:
contents: read
pull-requests: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }} # Ensure that only one instance of this workflow is running per Pull Request
cancel-in-progress: true # Cancel any previous runs of this workflow

jobs:
validate-commits:
name: Conventional Commits Validation
runs-on: ubuntu-latest
steps:
- uses: dev-build-deploy/[email protected]
env:
FORCE_COLOR: 3
with:
token: ${{ secrets.GITHUB_TOKEN }}
include-commits: false
update-labels: false
config: ".commit-me.json"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Approvers ([@open-telemetry/ruby-approvers](https://github.com/orgs/open-telemet
- [Andrew Hayworth](https://github.com/ahayworth), Shopify
- [Sam Handler](https://github.com/plantfansam), Shopify
- [Robb Kidd](https://github.com/robbkidd), Honeycomb
- [Kayla Reopelle](https://github.com/kaylareopelle), New Relic

*Find more about the approver role in [community repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#approver).*

Expand All @@ -43,6 +42,7 @@ Maintainers ([@open-telemetry/ruby-maintainers](https://github.com/orgs/open-tel
- [Francis Bogsanyi](https://github.com/fbogsany), Shopify
- [Matthew Wear](https://github.com/mwear), Lightstep
- [Daniel Azuma](https://github.com/dazuma), Google
- [Kayla Reopelle](https://github.com/kaylareopelle), New Relic

*Find more about the maintainer role in [community repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#maintainer).*

Expand Down
8 changes: 4 additions & 4 deletions examples/metrics_sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ receivers:
# Default endpoints: 0.0.0.0:4317 for gRPC and 0.0.0.0:4318 for HTTP

exporters:
logging:
loglevel: debug
debug:
verbosity: detailed

processors:
batch:
Expand All @@ -47,11 +47,11 @@ service:
traces:
receivers: [otlp]
processors: [batch]
exporters: [logging]
exporters: [debug]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [logging]
exporters: [debug]
```

More information on how to setup the OTel collector can be found in the in [quick start docs](https://opentelemetry.io/docs/collector/quick-start/).
Expand Down
2 changes: 1 addition & 1 deletion examples/otel-collector/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
OTELCOL_IMG=otel/opentelemetry-collector-contrib:0.35.0
OTELCOL_IMG=otel/opentelemetry-collector-contrib:0.109.0
OTELCOL_ARGS=
14 changes: 8 additions & 6 deletions examples/otel-collector/otel-collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ receivers:
otlp:
protocols:
http:
endpoint: 0.0.0.0:4318

exporters:
logging:
debug:

zipkin:
endpoint: "http://zipkin-all-in-one:9411/api/v2/spans"
format: proto

jaeger:
endpoint: jaeger-all-in-one:14250
insecure: true
otlp:
endpoint: jaeger-all-in-one:4317
tls:
insecure: true

processors:
batch:
Expand All @@ -23,8 +25,8 @@ service:
traces:
receivers: [otlp]
processors: [batch]
exporters: [logging, zipkin, jaeger]
exporters: [debug, zipkin, otlp]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [logging]
exporters: [debug]
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@
end

it 'translates all the things' do
# TODO: See issue #1507 to fix
skip 'Intermittently fails' if RUBY_ENGINE == 'truffleruby'

OpenTelemetry.tracer_provider = OpenTelemetry::SDK::Trace::TracerProvider.new(resource: OpenTelemetry::SDK::Resources::Resource.telemetry_sdk)
tracer = OpenTelemetry.tracer_provider.tracer('tracer', 'v0.0.1')
other_tracer = OpenTelemetry.tracer_provider.tracer('other_tracer')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,6 @@
end

it 'translates all the things' do
# TODO: See issue #1507 to fix
skip 'Intermittently fails' if RUBY_ENGINE == 'truffleruby'

stub_request(:post, 'http://localhost:4318/v1/traces').to_return(status: 200)
processor = OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(exporter)
tracer = OpenTelemetry.tracer_provider.tracer('tracer', 'v0.0.1')
Expand Down Expand Up @@ -635,7 +632,7 @@
)

assert_requested(:post, 'http://localhost:4318/v1/traces') do |req|
req.body == Zlib.gzip(encoded_etsr)
Zlib.gunzip(req.body) == encoded_etsr
end
end
end
Expand Down
19 changes: 19 additions & 0 deletions exporter/otlp-logs/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
inherit_from:
- ../../contrib/rubocop.yml

AllCops:
Exclude:
- "lib/opentelemetry/proto/**/*"
- "vendor/**/*"

Naming/FileName:
Exclude:
- lib/opentelemetry-exporter-otlp-logs.rb
Style/StringLiterals:
Exclude:
- gemfiles/**/*
Style/FrozenStringLiteralComment:
Exclude:
- gemfiles/**/*
Metrics/BlockLength:
Enabled: false
9 changes: 9 additions & 0 deletions exporter/otlp-logs/.yardopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--no-private
--title=OpenTelemetry OTLP Logs Exporter
--markup=markdown
--main=README.md
./lib/opentelemetry/exporter/otlp-logs/**/*.rb
./lib/opentelemetry/exporter/otlp.rb
-
README.md
CHANGELOG.md
21 changes: 21 additions & 0 deletions exporter/otlp-logs/Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# frozen_string_literal: true

# Copyright The OpenTelemetry Authors
#
# SPDX-License-Identifier: Apache-2.0

appraise 'google-protobuf-3.18.0' do
gem 'google-protobuf', '~> 3.18.0'
end

appraise 'google-protobuf-3.25.0' do
gem 'google-protobuf', '~> 3.25.0'
end

appraise 'google-protobuf-4.29.0' do
gem 'google-protobuf', '~> 4.29.0'
end

appraise 'google-protobuf-latest' do
gem 'google-protobuf'
end
1 change: 1 addition & 0 deletions exporter/otlp-logs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Release History: opentelemetry-exporter-otlp-logs
24 changes: 24 additions & 0 deletions exporter/otlp-logs/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# frozen_string_literal: true

# Copyright The OpenTelemetry Authors
#
# SPDX-License-Identifier: Apache-2.0

source 'https://rubygems.org'

gemspec

group :test, :development do
gem 'opentelemetry-api', path: '../../api'
gem 'opentelemetry-common', path: '../../common'
gem 'opentelemetry-logs-api', path: '../../logs_api'
gem 'opentelemetry-logs-sdk', path: '../../logs_sdk'
gem 'opentelemetry-registry', path: '../../registry'
gem 'opentelemetry-sdk', path: '../../sdk'
gem 'opentelemetry-semantic_conventions', path: '../../semantic_conventions'
gem 'opentelemetry-test-helpers', path: '../../test_helpers'
end

group :test do
gem 'minitest-stub-const'
end
Loading
Loading