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

Remove mapping for field faas.trigger #2192

Closed
gsantoro opened this issue Apr 5, 2023 · 3 comments · Fixed by #2194
Closed

Remove mapping for field faas.trigger #2192

gsantoro opened this issue Apr 5, 2023 · 3 comments · Fixed by #2194
Assignees
Labels
enhancement New feature or request

Comments

@gsantoro
Copy link
Contributor

gsantoro commented Apr 5, 2023

Summary

I would like to remove the mapping for the field faas.trigger of type nested.

Motivation:

  • The field faas.trigger can only accept a single object like you can see in the apm code at here
  • Nested documents and queries are typically expensive
  • the field faas.trigger is an object in ECS but it maps to a single string in Otel like documented at issue and in the Otel docs
  • Avoiding unnecessary nested fields should make it easier to support subobjects: false in the project Logs+ for default o11y mappings.

Detailed Design:

Provide additional details around the design of the proposed changes.

  • Field names: faas.trigger
  • Example values for the fields
"trigger": {
          "request_id": "10",
          "type": "http"
      }
  }
  • Suggested appropriate datatypes

suggested mapping. Notice the change

{
    "mappings": {
        "properties": {
            "faas": {
                "type": "object"
            },
            "mappings": {
                "properties": {
                    "trigger": {
                        "type": "object"
                    },
                    "mappings": {
                        "properties": {
                            "request_id": {
                                "type": "keyword"
                            },
                            "type": {
                                "type": "keyword"
                            }
                        }
                    }
                }
            }
        }
    }
}
  • Any example events that map to the proposed use case(s)
{
    "faas": {
        "trigger": {
            "request_id": "10",
            "type": "http"
        }
    }
}

or

{
    "faas.trigger.request_id": "10",
    "faas.trigger.type": "http"
}
@gsantoro gsantoro added the enhancement New feature or request label Apr 5, 2023
@gsantoro gsantoro self-assigned this Apr 5, 2023
@ebeahan ebeahan added breaking enhancement New feature or request and removed enhancement New feature or request breaking labels Apr 5, 2023
@ebeahan
Copy link
Member

ebeahan commented Apr 5, 2023

Can we incorporate this change and feedback into a Stage 3 PR for the faas.* RFC? Seems like a sensible change we want to incorporate before making the faas.* fields GA in the schema, and it'd be great to advance and finalize that RFC.

@gsantoro
Copy link
Contributor Author

gsantoro commented Apr 6, 2023

hello @ebeahan , after a discussion with @AlexanderWert we are thinking to add the change into stage 2 still to prevent to go GA yet.

@felixbarny
Copy link
Member

After the ECS changes get merged, please also adjust the dynamic ECS mappings in elastic-package: https://github.com/elastic/elastic-package/blob/6904fbc9f58d4f967819d09f71675637e47391a6/internal/builder/_static/ecs_mappings.yaml#L450-L453

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

Successfully merging a pull request may close this issue.

3 participants