Skip to content

Commit

Permalink
Merge branch 'master' into service-specific-source-maps
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartnelson3 committed Jun 18, 2021
2 parents e339269 + 17166cd commit 74b57d3
Show file tree
Hide file tree
Showing 24 changed files with 309 additions and 77 deletions.
56 changes: 42 additions & 14 deletions apmpackage/apm/agent/input/template.yml.hbs
Original file line number Diff line number Diff line change
@@ -1,32 +1,60 @@
apm-server:
host: {{host}}
auth:
secret_token: {{secret_token}}
api_key:
enabled: {{api_key_enabled}}
limit: {{api_key_limit}}
max_event_size: {{max_event_bytes}}
api_key:
enabled: {{api_key_enabled}}
limit: {{api_key_limit}}
capture_personal_data: {{capture_personal_data}}
idle_timeout: {{idle_timeout}}
default_service_environment: {{default_service_environment}}
expvar.enabled: {{expvar_enabled}}
host: {{host}}
max_connections: {{max_connections}}
max_event_size: {{max_event_bytes}}
max_header_size: {{max_header_bytes}}
read_timeout: {{read_timeout}}
response_headers: {{response_headers}}
rum:
enabled: {{enable_rum}}
{{#if sourcemap_api_key}}
source_mapping.elasticsearch.api_key: {{sourcemap_api_key}}
{{/if}}
allow_service_names:
{{#each rum_allow_service_names}}
allow_headers:
{{#each rum_allow_headers}}
- {{this}}
{{/each}}
allow_origins:
{{#each rum_allow_origins}}
- {{this}}
{{/each}}
allow_headers:
{{#each rum_allow_headers}}
allow_service_names:
{{#each rum_allow_service_names}}
- {{this}}
{{/each}}
library_pattern: {{rum_library_pattern}}
exclude_from_grouping: {{rum_exclude_from_grouping}}
response_headers: {{rum_response_headers}}
enabled: {{enable_rum}}
event_rate.limit: {{rum_event_rate_limit}}
event_rate.lru_size: {{rum_event_rate_lru_size}}
exclude_from_grouping: {{rum_exclude_from_grouping}}
library_pattern: {{rum_library_pattern}}
response_headers: {{rum_response_headers}}
source_mapping.elasticsearch.api_key: {{sourcemap_api_key}}
secret_token: {{secret_token}}
shutdown_timeout: {{shutdown_timeout}}
{{#if tls_enabled}}
ssl:
enabled: {{tls_enabled}}
certificate: {{tls_certificate}}
key: {{tls_key}}
key_passphrase: {{tls_key_passphrase}}
supported_protocols: {{tls_supported_protocols}}
{{#each tls_supported_protocols}}
- {{this}}
{{/each}}
cipher_suites: {{tls_cipher_suites}}
{{#each tls_cipher_suites}}
- {{this}}
{{/each}}
curve_types: {{tls_curve_types}}
{{#each tls_curve_types}}
- {{this}}
{{/each}}
{{/if}}
write_timeout: {{write_timeout}}
4 changes: 2 additions & 2 deletions apmpackage/apm/data_stream/traces/fields/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@
- name: span.destination.service.name
type: keyword
description: |
Identifier for the destination service (e.g. 'http://elastic.co', 'elasticsearch', 'rabbitmq')
Identifier for the destination service (e.g. 'http://elastic.co', 'elasticsearch', 'rabbitmq') DEPRECATED: this field will be removed in a future release
- name: span.destination.service.resource
type: keyword
description: |
Identifier for the destination service resource being operated on (e.g. 'http://elastic.co:80', 'elasticsearch', 'rabbitmq/queue_name')
- name: span.destination.service.type
type: keyword
description: |
Type of the destination service (e.g. 'db', 'elasticsearch'). Should typically be the same as span.type.
Type of the destination service (e.g. 'db', 'elasticsearch'). Should typically be the same as span.type. DEPRECATED: this field will be removed in a future release
- name: span.duration.us
type: long
description: |
Expand Down
4 changes: 2 additions & 2 deletions apmpackage/apm/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ Traces are written to `traces-apm.*` indices.
|span.action|The specific kind of event within the sub-type represented by the span (e.g. query, connect)|keyword| ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-no.png) |
|span.db.link|Database link.|keyword| ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-no.png) |
|span.db.rows\_affected|Number of rows affected by the database statement.|long| ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-no.png) |
|span.destination.service.name|Identifier for the destination service (e.g. 'http://elastic.co', 'elasticsearch', 'rabbitmq')|keyword| ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-no.png) |
|span.destination.service.name|Identifier for the destination service (e.g. 'http://elastic.co', 'elasticsearch', 'rabbitmq') DEPRECATED: this field will be removed in a future release|keyword| ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-no.png) |
|span.destination.service.resource|Identifier for the destination service resource being operated on (e.g. 'http://elastic.co:80', 'elasticsearch', 'rabbitmq/queue\_name')|keyword| ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-no.png) |
|span.destination.service.type|Type of the destination service (e.g. 'db', 'elasticsearch'). Should typically be the same as span.type.|keyword| ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-no.png) |
|span.destination.service.type|Type of the destination service (e.g. 'db', 'elasticsearch'). Should typically be the same as span.type. DEPRECATED: this field will be removed in a future release|keyword| ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-no.png) |
|span.duration.us|Duration of the span, in microseconds.|long| ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-no.png) |
|span.id|The ID of the span stored as hex encoded string.|keyword| ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-yes.png) |
|span.message.age.ms|Age of a message in milliseconds.|long| ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-no.png) |
Expand Down
99 changes: 96 additions & 3 deletions apmpackage/apm/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ policy_templates:
description: Enable Real User Monitoring (RUM).
required: true
show_user: true
default: false
default: true
- name: default_service_environment
type: text
title: Default Service Environment
Expand Down Expand Up @@ -112,14 +112,20 @@ policy_templates:
description: Maximum number of events allowed per IP per second.
required: false
show_user: false
default: 300
default: 10
- name: rum_event_rate_lru_size
type: integer
title: RUM - Rate limit cache size
description: Number of unique IPs to be cached for the rate limiter.
required: false
show_user: false
default: 1000
default: 10000
- name: sourcemap_api_key
type: text
title: RUM - API Key for Sourcemaps
required: false
description: API Key for sourcemap feature. Enter as <Id>:<API Key>
show_user: false
- name: api_key_limit
type: integer
title: Maximum number of API Keys for Agent authentication
Expand All @@ -140,6 +146,93 @@ policy_templates:
required: false
show_user: false
default: true
- name: max_header_bytes
type: integer
title: Maximum size of a request's header (bytes)
required: false
show_user: false
default: 1048576
- name: idle_timeout
type: text
title: Idle time before underlying connection is closed
required: false
show_user: false
default: "45s"
- name: read_timeout
type: text
title: Maximum duration for reading an entire request
required: false
show_user: false
default: "3600s"
- name: shutdown_timeout
type: text
title: Maximum duration before releasing resources when shutting down
required: false
show_user: false
default: "30s"
- name: write_timeout
type: text
title: Maximum duration for writing a response
required: false
show_user: false
default: "30s"
- name: max_connections
type: integer
title: Simultaneously accepted connections
description: 0 for unlimited
required: false
show_user: false
default: 0
- name: response_headers
type: yaml
title: Custom HTTP headers added to HTTP responses
description: Might be used for security policy compliance.
required: false
show_user: false
- name: expvar_enabled
type: bool
title: Enable APM Server Golang expvar support
description: exposed under /debug/vars
required: false
show_user: false
default: false
- name: tls_enabled
type: bool
title: Enable TLS
required: false
show_user: false
default: false
- name: tls_certificate
type: text
title: File path to server certificate
description: Required when TLS is enabled.
required: false
show_user: false
- name: tls_key
type: text
title: File path to server certificate key
description: Required when TLS is enabled.
required: false
show_user: false
- name: tls_supported_protocols
type: text
multi: true
title: Supported protocol versions
required: false
show_user: false
- name: tls_cipher_suites
type: text
multi: true
title: Cipher suites for TLS connections.
description: Not configurable for TLS 1.3.
required: false
show_user: false
- name: tls_curve_types
type: text
multi: true
title: Curve types for ECDHE based cipher suites
required: false
show_user: false
template_path: template.yml.hbs
owner:
github: elastic/apm-server
3 changes: 3 additions & 0 deletions changelogs/head.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ https://github.com/elastic/apm-server/compare/7.13\...master[View commits]
* Add support for adjusting OTel event timestamps using `telemetry.sdk.elastic_export_timestamp` {pull}5433[5433]
* Add support for OpenTelemetry labels describing mobile connectivity {pull}5436[5436]
* Introduce `apm-server.auth.*` config {pull}5457[5457]
* Add debug logging of OpenTelemetry payloads {pull}5474[5474]
* Add support for more input variables in fleet integration {pull}5444[5444]

[float]
==== Deprecated
* Make destination.service.name and destination.service.type fields optional and deprecated {pull}5468[5468]
* `apm-server.secret_token` is now `apm-server.auth.secret_token` {pull}5457[5457]
* `apm-server.api_key` is now `apm-server.auth.api_key` {pull}5457[5457]
4 changes: 2 additions & 2 deletions docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3877,7 +3877,7 @@ Destination service context
*`span.destination.service.type`*::
+
--
Type of the destination service (e.g. 'db', 'elasticsearch'). Should typically be the same as span.type.
Type of the destination service (e.g. 'db', 'elasticsearch'). Should typically be the same as span.type. DEPRECATED: this field will be removed in a future release
type: keyword
Expand All @@ -3887,7 +3887,7 @@ type: keyword
*`span.destination.service.name`*::
+
--
Identifier for the destination service (e.g. 'http://elastic.co', 'elasticsearch', 'rabbitmq')
Identifier for the destination service (e.g. 'http://elastic.co', 'elasticsearch', 'rabbitmq') DEPRECATED: this field will be removed in a future release
type: keyword
Expand Down
18 changes: 11 additions & 7 deletions docs/spec/rumv3/span.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@
],
"properties": {
"n": {
"description": "Name is the identifier for the destination service, e.g. 'http://elastic.co', 'elasticsearch', 'rabbitmq'",
"type": "string",
"description": "Name is the identifier for the destination service, e.g. 'http://elastic.co', 'elasticsearch', 'rabbitmq' DEPRECATED: this field will be removed in a future release",
"type": [
"null",
"string"
],
"maxLength": 1024
},
"rc": {
Expand All @@ -57,15 +60,16 @@
"maxLength": 1024
},
"t": {
"description": "Type of the destination service, e.g. db, elasticsearch. Should typically be the same as span.type.",
"type": "string",
"description": "Type of the destination service, e.g. db, elasticsearch. Should typically be the same as span.type. DEPRECATED: this field will be removed in a future release",
"type": [
"null",
"string"
],
"maxLength": 1024
}
},
"required": [
"n",
"rc",
"t"
"rc"
]
}
}
Expand Down
18 changes: 11 additions & 7 deletions docs/spec/rumv3/transaction.json
Original file line number Diff line number Diff line change
Expand Up @@ -715,8 +715,11 @@
],
"properties": {
"n": {
"description": "Name is the identifier for the destination service, e.g. 'http://elastic.co', 'elasticsearch', 'rabbitmq'",
"type": "string",
"description": "Name is the identifier for the destination service, e.g. 'http://elastic.co', 'elasticsearch', 'rabbitmq' DEPRECATED: this field will be removed in a future release",
"type": [
"null",
"string"
],
"maxLength": 1024
},
"rc": {
Expand All @@ -725,15 +728,16 @@
"maxLength": 1024
},
"t": {
"description": "Type of the destination service, e.g. db, elasticsearch. Should typically be the same as span.type.",
"type": "string",
"description": "Type of the destination service, e.g. db, elasticsearch. Should typically be the same as span.type. DEPRECATED: this field will be removed in a future release",
"type": [
"null",
"string"
],
"maxLength": 1024
}
},
"required": [
"n",
"rc",
"t"
"rc"
]
}
}
Expand Down
18 changes: 11 additions & 7 deletions docs/spec/v2/span.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,11 @@
],
"properties": {
"name": {
"description": "Name is the identifier for the destination service, e.g. 'http://elastic.co', 'elasticsearch', 'rabbitmq'",
"type": "string",
"description": "Name is the identifier for the destination service, e.g. 'http://elastic.co', 'elasticsearch', 'rabbitmq' ( DEPRECATED: this field will be removed in a future release",
"type": [
"null",
"string"
],
"maxLength": 1024
},
"resource": {
Expand All @@ -121,15 +124,16 @@
"maxLength": 1024
},
"type": {
"description": "Type of the destination service, e.g. db, elasticsearch. Should typically be the same as span.type.",
"type": "string",
"description": "Type of the destination service, e.g. db, elasticsearch. Should typically be the same as span.type. DEPRECATED: this field will be removed in a future release",
"type": [
"null",
"string"
],
"maxLength": 1024
}
},
"required": [
"name",
"resource",
"type"
"resource"
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion include/fields.go

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions internal/.otel_collector_mixin/otlptext/mixin.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright The 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.

package otlptext

import (
"go.opentelemetry.io/collector/consumer/pdata"
"go.opentelemetry.io/collector/internal/otlptext"
)

func Traces(td pdata.Traces) string {
return otlptext.Traces(td)
}

func Metrics(md pdata.Metrics) string {
return otlptext.Metrics(md)
}
Loading

0 comments on commit 74b57d3

Please sign in to comment.