Skip to content

line protocol String() method for data points #420

@aep-sunlife

Description

@aep-sunlife

Proposal:

Integrate the standard line protocol format into the String() method for Point, in order to facilitate debugging.

Current behavior:

The stock Go struct format is used.

Desired behavior:

The InfluxDB line protocol should be used.

In fact, InfluxDB publishes two separate Go modules, one for line protocol manipulation and another for HTTP request manipulation. The former uses encoder objects while the latter uses point objects. The latter provides internal functions to convert points to line protocol, though this is inaccessible via normal Go means, as the service handle underneath the WriteApi[Blocking] handles uses lowercase notation.

Alternatives considered:

At least promote the service field of the WriteApi[Blocking] handlers to a public API member.

Use case:

When troubleshooting metrics, it is more practical to see a human readable format such as the line protocol, rather than raw Go values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions