Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 2 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,13 @@ docker-compose.override.yml:
# Rules for updating config files, fields.yml, etc.
##############################################################################

update: fields go-generate add-headers copy-docs gen-package notice $(MAGE)
update: fields go-generate add-headers copy-docs build-package notice $(MAGE)
@$(MAGE) update

fields_sources=\
$(shell find model -name fields.yml) \
$(shell find x-pack/apm-server/fields -name fields.yml)

.PHONY: gen-package gen-package-only
gen-package: gen-package-only format-package build-package
gen-package-only: $(GENPACKAGE)
@$(GENPACKAGE)

fields: include/fields.go x-pack/apm-server/include/fields.go
include/fields.go x-pack/apm-server/include/fields.go: $(MAGE) magefile.go $(fields_sources)
@$(MAGE) fields
Expand Down Expand Up @@ -232,6 +227,7 @@ check-package: $(ELASTICPACKAGE)
format-package: $(ELASTICPACKAGE)
@(cd apmpackage/apm; $(CURDIR)/$(ELASTICPACKAGE) format)
build-package: $(ELASTICPACKAGE)
@rm -fr ./build/integrations/apm/*
@(cd apmpackage/apm; $(CURDIR)/$(ELASTICPACKAGE) build)

.PHONY: check-gofmt check-autopep8 gofmt autopep8
Expand Down Expand Up @@ -262,10 +258,6 @@ $(BIN_MAGE): go.mod
$(MAGE): magefile.go $(BIN_MAGE)
$(BIN_MAGE) -compile=$@

.PHONY: $(GENPACKAGE)
$(GENPACKAGE):
@$(GO) build -o $@ github.com/elastic/apm-server/apmpackage/cmd/gen-package

$(GOLINT): go.mod
$(GO) build -o $@ golang.org/x/lint/golint

Expand Down
4 changes: 2 additions & 2 deletions apmpackage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

1. Actual work
- Make changes in `apmpackage/apm` and/or code as needed
- Run `make update`. That will update fields, pipeline and doc files based on apm-server fields and pipeline defs.
- Run `make build-package`

2. Run the registry
- Checkout a fresh master from the registry and run `mage build`
- Copy `apmpackage/apm` in apm-server to `build/package-storage/packages/apm/<version>` in the registry
- Copy `build/integrations/apm/<version>` in apm-server to `build/package-storage/packages/apm/<version>` in the registry
- `go run .`

3. Run the stack
Expand Down
4 changes: 4 additions & 0 deletions apmpackage/apm/_dev/build/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dependencies:
ecs:
# TODO(axw) make sure this is kept in sync with the ECS version used in libbeat.
reference: [email protected]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way we can introduce some sort of check in the makefile or the build package process to error if it's not? Doesn't necessarily have to be done in this PR but may be a good candidate for a follow-up.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we could even automate that as part of the make update-beats command (in a follow up PR).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, opened #6362 to track this

Original file line number Diff line number Diff line change
Expand Up @@ -47,61 +47,33 @@ IMPORTANT: If you run APM Server with Elastic Agent manually in standalone mode,
## Traces

Traces are comprised of [spans and transactions](https://www.elastic.co/guide/en/apm/get-started/current/apm-data-model.html).
Traces are written to `traces-apm.*` indices.

**Exported Fields**
Traces are written to `traces-apm-*` data streams.

| Field | Description | Type | ECS |
|---|---|---|:---:|
{{range .Traces -}}
| {{- Trim .Name | EscapeMarkdown -}} | {{- Trim .Description | EscapeMarkdown -}} | {{- Trim .Type | EscapeMarkdown -}} | {{if .IsECS}} ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-yes.png) {{else}} ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-no.png) {{end}} |
{{end}}
{{fields "traces"}}

#### Examples
## Application Metrics

```json
{{.TransactionExample}}
```
Application metrics are comprised of custom, application-specific metrics, basic system metrics such as CPU and memory usage,
and runtime metrics such as JVM garbage collection statistics.

```json
{{.SpanExample}}
```
Application metrics are written to service-specific `metrics-apm.app.*-*` data streams.

{{fields "app_metrics"}}

## Metrics
## Internal Metrics

Metrics include application-based metrics and some basic system metrics.
Metrics are written to `metrics-apm.app.*`, `metrics-apm.internal.*`, and `metrics-apm.profiling.*` indices.
Internal metrics comprises metrics produced by Elastic APM agents and Elastic APM server for powering various Kibana charts
in the APM app, such as "Time spent by span type".

**Exported Fields**
Internal metrics are written to `metrics-apm.internal-*` data streams.

| Field | Description | Type | ECS |
|---|---|---|:---:|
{{range .Metrics -}}
| {{- Trim .Name | EscapeMarkdown -}} | {{- Trim .Description | EscapeMarkdown -}} | {{- Trim .Type | EscapeMarkdown -}} | {{if .IsECS}} ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-yes.png) {{else}} ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-no.png) {{end}} |
{{end}}
{{fields "internal_metrics"}}

### Example
## Application errors

```json
{{.MetricsExample}}
```
Application errors comprises error/exception events occurring in an application.

## Logs
Application errors are written to `logs-apm.error.*` data stream.

Logs are application error events.
Logs are written to `logs-apm.error.*` indices.

**Exported Fields**

| Field | Description | Type | ECS |
|---|---|---|:---:|
{{range .Logs -}}
| {{- Trim .Name | EscapeMarkdown -}} | {{- Trim .Description | EscapeMarkdown -}} | {{- Trim .Type | EscapeMarkdown -}} | {{if .IsECS}} ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-yes.png) {{else}} ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-no.png) {{end}} |
{{end}}

### Example

```json
{{.ErrorExample}}
```
{{fields "error_logs"}}
26 changes: 19 additions & 7 deletions apmpackage/apm/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,30 @@
# change type can be one of: enhancement, bugfix, breaking-change
- version: "7.16.0"
changes:
- description: version bump to align package version with stack version
- description: updated package version to align with stack version
type: enhancement
link: https://github.com/elastic/apm-server/issues/4898
- description: added client.geo fields to internal_metrics
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the language we use is inconsistent with the first (already existing) item - could you update to for consistency:

version bumped to align package version with stack version

Actually, it is inconsistent also compared to prev. versions - since this is a big refactor PR, would you mind aligning?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated all changelog descriptions in the package to use past tense

type: bugfix
link: https://github.com/elastic/apm-server/pull/6359
- description: removed unused fields
type: enhancement
link: https://github.com/elastic/apm-server/pull/6359
- description: changed processor.{name,event} to constant_keyword where possible
type: enhancement
link: https://github.com/elastic/apm-server/pull/6359
- description: changed to data-stream specific ingest pipelines
type: enhancement
link: https://github.com/elastic/apm-server/pull/6359
- version: "0.5.0"
changes:
- description: define index sorting for internal metrics
- description: added index sorting for internal metrics
type: enhancement
link: https://github.com/elastic/apm-server/pull/6116
- description: add histogram dynamic_template to app metrics data stream
- description: added histogram dynamic_template to app metrics data stream
type: enhancement
link: https://github.com/elastic/apm-server/pull/6043
- description: remove warm phase from ILM policies
- description: removed warm phase from ILM policies
type: enhancement
link: https://github.com/elastic/apm-server/pull/6229
- description: added privileges to tail-sampled traces data stream
Expand All @@ -25,10 +37,10 @@
link: https://github.com/elastic/apm-server/pull/6139
- version: "0.4.0"
changes:
- description: add anonymous auth config, replace some RUM config
- description: added anonymous auth config, replace some RUM config
type: breaking-change
link: https://github.com/elastic/apm-server/pull/5623
- description: use new apm-server.auth config
- description: updated to use new apm-server.auth config
type: breaking-change
link: https://github.com/elastic/apm-server/pull/5691
- version: "0.3.0"
Expand All @@ -44,7 +56,7 @@
- description: added support for apm-server.rum.allow_service_names
type: enhancement
link: https://github.com/elastic/apm-server/pull/5030
- description: introduce a configurable default service environment
- description: added support a configurable default service environment
type: enhancement
link: https://github.com/elastic/apm-server/pull/4861
- version: "0.1.0"
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading