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

Iterate package #4473

Merged
merged 5 commits into from
Dec 2, 2020
Merged

Iterate package #4473

merged 5 commits into from
Dec 2, 2020

Conversation

jalvz
Copy link
Contributor

@jalvz jalvz commented Dec 1, 2020

Motivation/summary

This does a few things:

  • Splits metrics data stream into app metrics, internal and profiles. This is following the indexing strategy proposal.
  • Adds the dataset property to the manifest files so the right templates are created.
  • Sort and dedup fields (within each yml file). Fields are now flattened.
  • Generates data stream pipelines out of our definitions.json file

Missing from this PR / WIP: Pipelines are tied to data streams, we need to copy the ones that are used for other event types to the right data stream folder. Right now all are under traces. This shouldn't block the review.

Checklist

I have considered changes for:

How to test these changes

In short: run the package, install it, and check that all templates and pipelines installed are correct.

Related issues

Part of #4004

@apmmachine
Copy link
Contributor

apmmachine commented Dec 1, 2020

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #4473 updated

  • Start Time: 2020-12-02T13:35:15.167+0000

  • Duration: 50 min 16 sec

Test stats 🧪

Test Results
Failed 0
Passed 4623
Skipped 141
Total 4764

Steps errors 3

Expand to view the steps failures

Compress

  • Took 0 min 0 sec . View more details on here
  • Description: tar --exclude=coverage-files.tgz -czf coverage-files.tgz coverage

Compress

  • Took 0 min 0 sec . View more details on here
  • Description: tar --exclude=system-tests-linux-files.tgz -czf system-tests-linux-files.tgz system-tests

Test Sync

  • Took 3 min 15 sec . View more details on here
  • Description: ./.ci/scripts/sync.sh

@codecov-io
Copy link

Codecov Report

Merging #4473 (7bed6bd) into master (49d55cc) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #4473      +/-   ##
==========================================
- Coverage   76.07%   76.04%   -0.03%     
==========================================
  Files         160      160              
  Lines        9775     9781       +6     
==========================================
+ Hits         7436     7438       +2     
- Misses       2339     2343       +4     
Impacted Files Coverage Δ
beater/beater.go 56.52% <0.00%> (-1.69%) ⬇️
processor/otel/consumer.go 93.95% <0.00%> (+0.44%) ⬆️

@jalvz jalvz mentioned this pull request Dec 1, 2020
15 tasks
@jalvz jalvz force-pushed the iterate-package branch 2 times, most recently from 408649e to 697399f Compare December 2, 2020 12:06
@jalvz jalvz merged commit 1a254a4 into elastic:master Dec 2, 2020
jalvz added a commit to jalvz/apm-server that referenced this pull request Dec 2, 2020
Improves package generation.

- Splits metrics data stream into app metrics, internal and profiles. This is following the indexing strategy proposal.  - Adds the dataset property to the manifest files so the right templates are created.
- Sort and dedup fields (within each yml file). Fields are now flattened.
- Generates data stream pipelines out of our definitions.json file
jalvz added a commit to jalvz/apm-server that referenced this pull request Dec 2, 2020
Improves package generation.

- Splits metrics data stream into app metrics, internal and profiles. This is following the indexing strategy proposal.  - Adds the dataset property to the manifest files so the right templates are created.
- Sort and dedup fields (within each yml file). Fields are now flattened.
- Generates data stream pipelines out of our definitions.json file
jalvz added a commit to jalvz/apm-server that referenced this pull request Dec 2, 2020
Improves package generation.

- Splits metrics data stream into app metrics, internal and profiles. This is following the indexing strategy proposal.  - Adds the dataset property to the manifest files so the right templates are created.
- Sort and dedup fields (within each yml file). Fields are now flattened.
- Generates data stream pipelines out of our definitions.json file
jalvz added a commit to jalvz/apm-server that referenced this pull request Dec 3, 2020
Improves package generation.

- Splits metrics data stream into app metrics, internal and profiles. This is following the indexing strategy proposal.  - Adds the dataset property to the manifest files so the right templates are created.
- Sort and dedup fields (within each yml file). Fields are now flattened.
- Generates data stream pipelines out of our definitions.json file
jalvz added a commit to jalvz/apm-server that referenced this pull request Dec 3, 2020
Improves package generation.

- Splits metrics data stream into app metrics, internal and profiles. This is following the indexing strategy proposal.  - Adds the dataset property to the manifest files so the right templates are created.
- Sort and dedup fields (within each yml file). Fields are now flattened.
- Generates data stream pipelines out of our definitions.json file
jalvz added a commit to jalvz/apm-server that referenced this pull request Dec 4, 2020
Improves package generation.

- Splits metrics data stream into app metrics, internal and profiles. This is following the indexing strategy proposal.  - Adds the dataset property to the manifest files so the right templates are created.
- Sort and dedup fields (within each yml file). Fields are now flattened.
- Generates data stream pipelines out of our definitions.json file
jalvz added a commit to jalvz/apm-server that referenced this pull request Dec 8, 2020
Improves package generation.

- Splits metrics data stream into app metrics, internal and profiles. This is following the indexing strategy proposal.  - Adds the dataset property to the manifest files so the right templates are created.
- Sort and dedup fields (within each yml file). Fields are now flattened.
- Generates data stream pipelines out of our definitions.json file
jalvz added a commit to jalvz/apm-server that referenced this pull request Dec 15, 2020
Improves package generation.

- Splits metrics data stream into app metrics, internal and profiles. This is following the indexing strategy proposal.  - Adds the dataset property to the manifest files so the right templates are created.
- Sort and dedup fields (within each yml file). Fields are now flattened.
- Generates data stream pipelines out of our definitions.json file

# Conflicts:
#	NOTICE.txt
#	apmpackage/apm/0.1.0/data_stream/logs/fields/ecs.yml
#	apmpackage/apm/0.1.0/data_stream/logs/fields/fields.yml
#	apmpackage/apm/0.1.0/data_stream/metrics/fields/ecs.yml
#	apmpackage/apm/0.1.0/data_stream/traces/fields/ecs.yml
jalvz added a commit that referenced this pull request Dec 15, 2020
Improves package generation.

- Splits metrics data stream into app metrics, internal and profiles. This is following the indexing strategy proposal.  - Adds the dataset property to the manifest files so the right templates are created.
- Sort and dedup fields (within each yml file). Fields are now flattened.
- Generates data stream pipelines out of our definitions.json file

# Conflicts:
#	NOTICE.txt
#	apmpackage/apm/0.1.0/data_stream/logs/fields/ecs.yml
#	apmpackage/apm/0.1.0/data_stream/logs/fields/fields.yml
#	apmpackage/apm/0.1.0/data_stream/metrics/fields/ecs.yml
#	apmpackage/apm/0.1.0/data_stream/traces/fields/ecs.yml
@axw axw self-assigned this Jan 12, 2021
@axw
Copy link
Member

axw commented Jan 12, 2021

Due to issues getting Elastic Agent + APM Server to run with 7.11.0 BC, and given that this isn't user facing yet, I'm testing with 8.0.0-SNAPSHOT.

  • Installed package apm 0.1.0-dev.3
  • Ran a program that sent a transaction, span, error, Go runtime metrics, custom metric
  • Checked data streams:

image

  • traces-apm-default contains the transaction and span
  • logs-apm.error-default contains the error
  • metrics-apm-default contains contains the Go runtime metrics and custom metric
  • metrics-apm.internal-default contains breakdown metrics

That all seems good. I found a couple of issues.

The Data Streams list in the Fleet app does not list the "traces" data stream:

image

The "labels.foo" dynamic templates are missing from mappings:

image

Looking more closely at the package, I see that the fields.yml definitions for labels doesn't have all the bits from our overrides:

- name: labels
type: object
description: |
A flat mapping of user-defined labels with string, boolean or number values.

- name: labels
type: object
object_type_params:
- object_type: keyword
- object_type: boolean
- object_type: scaled_float
scaling_factor: 1000000
dynamic: true
overwrite: true
description: >
A flat mapping of user-defined labels with string, boolean or number values.

@axw
Copy link
Member

axw commented Jan 12, 2021

Opened #4610 for the dynamic templates issue.

@axw
Copy link
Member

axw commented Jan 12, 2021

@axw
Copy link
Member

axw commented Jan 13, 2021

For want of a better label, marking this "regression" given the labels issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants