Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3 from petethepig/profiling
Browse files Browse the repository at this point in the history
Adds Profiling Signal
  • Loading branch information
petethepig authored Jul 26, 2023
2 parents c454d6d + 54bba7a commit 622c165
Show file tree
Hide file tree
Showing 16 changed files with 1,628 additions and 16 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,15 @@ jobs:

- name: run markdown-link-check
run: make markdown-link-check

markdownlint:
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v2

- name: install dependencies
run: npm install

- name: run markdownlint
run: make markdownlint
8 changes: 6 additions & 2 deletions .markdown_link_check_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@
],
"replacementPatterns": [
{
"pattern": "^/",
"replacement": "{{BASEURL}}/"
"pattern": "^/",
"replacement": "{{BASEURL}}/"
},
{
"pattern": "^https://github.com/open-telemetry/opentelemetry-proto/(blob|tree)/[^/]+/docs/",
"replacement": "LINK-CHECK-ERROR-USE-LOCAL-PATH-TO-DOC-PAGE-NOT-EXTERNAL-URL/"
}
],
"retryOn429": true,
Expand Down
14 changes: 14 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
# and https://github.com/DavidAnson/markdownlint/blob/main/README.md

# Default state for all rules
default: true

ul-style: false
line-length: false
no-duplicate-header:
siblings_only: true
ol-prefix:
style: ordered
no-inline-html: false
fenced-code-language: false
23 changes: 17 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@

## Unreleased

Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.20.0...main).
Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v1.0.0...main).

## 1.0.0 - 2023-07-03

Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.20.0...v1.0.0).

### Maturity

* Add note about the possibility to have unstable components after 1.0.0
[#489](https://github.com/open-telemetry/opentelemetry-proto/pull/489)
* Add maturity JSON entry per package
[#490](https://github.com/open-telemetry/opentelemetry-proto/pull/490)

## 0.20.0 - 2023-06-06

Expand Down Expand Up @@ -47,7 +58,7 @@ Full list of differences found in [this compare](https://github.com/open-telemet
* Add `csharp_namespace` option to protos.
([#399](https://github.com/open-telemetry/opentelemetry-proto/pull/399))
* Fix some out-of-date urls which link to [specification](https://github.com/open-telemetry/opentelemetry-specification). ([#402](https://github.com/open-telemetry/opentelemetry-proto/pull/402))
* :stop_sign: [BREAKING] Delete deprecated InstrumentationLibrary,
* :stop_sign: [BREAKING] Delete deprecated InstrumentationLibrary,
InstrumentationLibraryLogs, InstrumentationLibrarySpans and
InstrumentationLibraryMetrics messages. Delete deprecated
instrumentation_library_logs, instrumentation_library_spans and
Expand Down Expand Up @@ -126,7 +137,7 @@ Full list of differences found in [this compare](https://github.com/open-telemet

* Remove unused deprecated message StringKeyValue (#358)
* Remove experimental metrics config service (#359)

## 0.12.0 - 2022-01-19

Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.11.0...v0.12.0).
Expand Down Expand Up @@ -277,9 +288,9 @@ Full list of differences found in [this compare.](https://github.com/open-teleme
### Changed
* :stop_sign: [BREAKING] Metrics - protocol was refactored, and lots of breaking changes.
** Removed MetricDescriptor and embedded into Metric and the new data types.
** Add new data types Gauge/Sum/Histogram.
** Make use of the "AggregationTemporality" into the data types that allow that support.
* Removed MetricDescriptor and embedded into Metric and the new data types.
* Add new data types Gauge/Sum/Histogram.
* Make use of the "AggregationTemporality" into the data types that allow that support.
* Rename enum values to follow the proto3 style guide.
### Added
Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $(1)
endef

.PHONY: all
all: gen-all markdown-link-check
all: gen-all markdown-link-check markdownlint

# Generate all implementations
.PHONY: gen-all
Expand Down Expand Up @@ -165,3 +165,12 @@ markdown-link-check:
npx --no -- markdown-link-check --quiet --config .markdown_link_check_config.json $$f \
|| exit 1; \
done

.PHONY: markdownlint
markdownlint:
@if ! npm ls markdownlint; then npm install; fi
@for f in $(ALL_DOCS); do \
echo $$f; \
npx --no -p markdownlint-cli markdownlint -c .markdownlint.yaml $$f \
|| exit 1; \
done
8 changes: 4 additions & 4 deletions examples/metrics.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{
"name": "my.counter",
"unit": "1",
"description": "I'm a Counter",
"description": "I am a Counter",
"sum": {
"aggregationTemporality": 1,
"isMonotonic": true,
Expand All @@ -53,7 +53,7 @@
{
"name": "my.gauge",
"unit": "1",
"description": "I'm a Gauge",
"description": "I am a Gauge",
"gauge": {
"dataPoints": [
{
Expand All @@ -74,7 +74,7 @@
{
"name": "my.histogram",
"unit": "1",
"description": "I'm a Histogram",
"description": "I am a Histogram",
"histogram": {
"aggregationTemporality": 1,
"dataPoints": [
Expand Down Expand Up @@ -104,4 +104,4 @@
]
}
]
}
}
79 changes: 79 additions & 0 deletions opentelemetry/proto/collector/profiles/v1/profiles_service.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// Copyright 2019, OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package opentelemetry.proto.collector.profiles.v1;

import "opentelemetry/proto/profiles/v1/profiles.proto";

option csharp_namespace = "OpenTelemetry.Proto.Collector.Profiles.V1";
option java_multiple_files = true;
option java_package = "io.opentelemetry.proto.collector.profiles.v1";
option java_outer_classname = "ProfilesServiceProto";
option go_package = "go.opentelemetry.io/proto/otlp/collector/profiles/v1";

// Service that can be used to push profiles between one Application instrumented with
// OpenTelemetry and a collector, or between a collector and a central collector (in this
// case spans are sent/received to/from multiple Applications).
service ProfilesService {
// For performance reasons, it is recommended to keep this RPC
// alive for the entire life of the application.
rpc Export(ExportProfilesServiceRequest) returns (ExportProfilesServiceResponse) {}
}

message ExportProfilesServiceRequest {
// An array of ResourceProfiles.
// For data coming from a single resource this array will typically contain one
// element. Intermediary nodes (such as OpenTelemetry Collector) that receive
// data from multiple origins typically batch the data before forwarding further and
// in that case this array will contain multiple elements.
repeated opentelemetry.proto.profiles.v1.ResourceProfiles resource_profiles = 1;
}

message ExportProfilesServiceResponse {
// The details of a partially successful export request.
//
// If the request is only partially accepted
// (i.e. when the server accepts only parts of the data and rejects the rest)
// the server MUST initialize the `partial_success` field and MUST
// set the `rejected_<signal>` with the number of items it rejected.
//
// Servers MAY also make use of the `partial_success` field to convey
// warnings/suggestions to senders even when the request was fully accepted.
// In such cases, the `rejected_<signal>` MUST have a value of `0` and
// the `error_message` MUST be non-empty.
//
// A `partial_success` message with an empty value (rejected_<signal> = 0 and
// `error_message` = "") is equivalent to it not being set/present. Senders
// SHOULD interpret it the same way as in the full success case.
ExportProfilesPartialSuccess partial_success = 1;
}

message ExportProfilesPartialSuccess {
// The number of rejected profiles.
//
// A `rejected_<signal>` field holding a `0` value indicates that the
// request was fully accepted.
int64 rejected_profiles = 1;

// A developer-facing human-readable message in English. It should be used
// either to explain why the server rejected parts of the data during a partial
// success or to convey warnings/suggestions during a full success. The message
// should offer guidance on how users can address such issues.
//
// error_message is an optional field. An error_message with an empty value
// is equivalent to it not being set.
string error_message = 2;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is an API configuration to generate an HTTP/JSON -> gRPC gateway for the
# OpenTelemetry service using github.com/grpc-ecosystem/grpc-gateway.
type: google.api.Service
config_version: 3
http:
rules:
- selector: opentelemetry.proto.collector.profiles.v1.ProfilesService.Export
post: /v1/profiles
body: "*"
Loading

0 comments on commit 622c165

Please sign in to comment.