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

[AWS][Lambda] Add dimension fields for TSDB support #5973

Merged
merged 3 commits into from
May 23, 2023

Conversation

constanca-m
Copy link
Contributor

@constanca-m constanca-m commented Apr 24, 2023

What does this PR do?

Add dimension fields to Lambda datastream.

Details

The lambda function name is unique per region within an account. Since the lambda function can have different versions, we need to make that a dimension as well. As the version affects the resource name, this will be our last dimension.

There was not a change in the number of documents after enabling TSDB:

image

Tested with one account, one lambda function with two different versions.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

How to test this PR locally

Refer to #5970

Related issues

Signed-off-by: constanca-m <constanca.manteigas@elastic.co>
Signed-off-by: constanca-m <constanca.manteigas@elastic.co>
@constanca-m constanca-m mentioned this pull request Apr 24, 2023
5 tasks
@elasticmachine
Copy link

elasticmachine commented Apr 24, 2023

💚 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 preview

Expand to view the summary

Build stats

  • Start Time: 2023-05-23T07:36:44.156+0000

  • Duration: 46 min 47 sec

Test stats 🧪

Test Results
Failed 0
Passed 188
Skipped 4
Total 192

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented Apr 24, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (15/15) 💚
Files 93.75% (15/16) 👎 -6.25
Classes 93.75% (15/16) 👎 -6.25
Methods 86.131% (236/274) 👎 -7.986
Lines 85.925% (7387/8597) 👎 -12.516
Conditionals 100.0% (0/0) 💚

description: Lambda function name.
- name: Resource
type: keyword
dimension: true
Copy link
Contributor

Choose a reason for hiding this comment

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

what is a meaning of the Resource field? From the issue description I got an impression that name of function and version uniquely identify the function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For example, without setting Resource as dimension, these 2 documents will be overwriting each other:
image

@tetianakravchenko

Copy link
Contributor

@tetianakravchenko tetianakravchenko May 3, 2023

Choose a reason for hiding this comment

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

hmm, what is the difference between those documents?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question. The only difference from comparing these two documents is than one has the dimension resource and the other has not, but even the values for the metrics are exactly the same @tetianakravchenko I am not sure if I should let be overwritten then or how to make sure that the one with the resource set will be the final document.

Copy link
Contributor

@tetianakravchenko tetianakravchenko May 3, 2023

Choose a reason for hiding this comment

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

@elastic/obs-cloud-monitoring is it an expected behavior that there are 2 documents with the same data?

@constanca-m so far it seems for me that generic pattern for aws package datasreams is to add all fields that are part of dimensions.* object, so I would keep it, I think we shouldn't make a decision on what should be overwritten

@constanca-m constanca-m merged commit 32af97c into elastic:main May 23, 2023
1 check passed
@constanca-m constanca-m deleted the lambda-add-dimensions branch May 23, 2023 08:31
@elasticmachine
Copy link

Package aws - 1.36.7 containing this change is available at https://epr.elastic.co/search?package=aws

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Integration:AWS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants