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

Provide per-pipeline timestamps #42107

Closed
peterpramb opened this issue May 12, 2019 · 3 comments
Closed

Provide per-pipeline timestamps #42107

peterpramb opened this issue May 12, 2019 · 3 comments
Labels
:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP

Comments

@peterpramb
Copy link

Describe the feature:

Currently _ingest.timestamp seems to be only set initially when entering an ingest pipeline at the first time. However to measure per-pipeline ingest delays (as discussed in elastic/ecs#453) an updated timestamp per pipeline would be needed.

Of course one can retrieve the date via script, but it would be more convenient to directly access it via metadata, either by letting _ingest.timestamp be updated on each pipeline call or by introducing a new ingest metadata field.

Here is a simple test case, Elasticsearch version is 6.7.1:

PUT /_ingest/pipeline/testing2-ingest-pipeline
{
    "processors": [
        {
            "append": {
                "field": "ingest.timestamps",
                "value": "{{_ingest.timestamp}}"
            }
        },
        {
            "pipeline": {
                "name": "testing2-chained-pipeline"
            }
        }
    ]
}
PUT /_ingest/pipeline/testing2-chained-pipeline
{
    "processors": [
        {
            "append": {
                "field": "ingest.timestamps",
                "value": "{{_ingest.timestamp}}"
            }
        }
    ]
}
POST /testing2-chained/_doc/?pipeline=testing2-ingest-pipeline
{
  "field": "value"
}
GET /testing2-chained/_doc/S25crGoBkBB05GCNSA5t
{
    "_id": "S25crGoBkBB05GCNSA5t",
    "_index": "testing2-chained",
    "_primary_term": 1,
    "_seq_no": 0,
    "_source": {
        "field": "value",
        "ingest": {
            "timestamps": [
                "2019-05-12T14:04:50.054Z",
                "2019-05-12T14:04:50.054Z"
            ]
        }
    },
    "_type": "_doc",
    "_version": 1,
    "found": true
}
@peterpramb
Copy link
Author

Is it possible that _ingest.timestamp is already properly updated and milisecond resolution is simply not enough here?

@javanna javanna added the :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP label May 13, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

@peterpramb
Copy link
Author

Probably not a good idea, _ingest.timestamp should stay as is. One can get the current time via script if really needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP
Projects
None yet
Development

No branches or pull requests

3 participants