Skip to content

[Documentation Request] Document c.e.c.elasticsearch._types.Time.Builder methods offset(int) and time(String) #190

Open
@cyrille-leclerc

Description

@cyrille-leclerc

Description

The Jenkins OpenTelemetry Plugin is using the Elasticsearch Point in Time API which requires to specify a TTL of the Point in Time using the c.e.c.elasticsearch._types.Time data structure (see code here):

Time POINT_IN_TIME_KEEP_ALIVE = Time.of(builder -> builder.time("30s"));

As we use a TTL of 30 seconds, we expected to use the Time.Builder#offset() API with an API that could look like Time.Builder#offset(int offset, TimeUnit offsetUnit). However, it's not possible as the Time.Builder#offset() API only takes one single integer parameter Time.Builder#offset(Integer offset).

Instead, we used the Time.Builder#offset(String v) methods which was not intuitive to us and that was not easy to understand as we didn't understand what was the expected format of the String parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: DocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions