What is it  •  Premises  •  Command Line Interface  •  REST API  •  Policy RFC
Opentelemetry Infinity provide otel-collector-contrib instances through a simple REST API using a policy mechanism. Each policy spin up a new otelcol-contrib process running the configuration provided by the policy.
1. Single binary: otlpinf embeds otelcol-contrib in its binary. Therefore, only one static binary is provided.
2. No persistence: opentelemetry-infinity stores data in memory and in temporary files only. This adds a new paradigm to opentelemetry-collector that is expected to run over a persisted config file as default. If you are looking for a opentelemetry orchestrator as the way it was planned to perform, you should try the official opentelemetry-operator.
3. Compatibility: opentelemetry-infinity is basically a wrapper over the official opentelemetry-collector which has not released a version 1.0 yet, i.e., breaking changes are expected. Any changes that occurs on its CLI will be reflected in this project.
4. Versioning: as opentelemetry-infinity is a wrapper over the official collector, it follows the official opentelemetry-collector version. opentelemetry-infinity pipeline does releases automatically on every new otelcol-contrib.
You can download and run using docker image:
docker run --net=host netboxlabs/opentelemetry-infinity run
Opentelemetry Infinity allows some start up configuration that is listed below. It disables opentelemetry-collector self telemetry by default to avoid port conflict. If you want to enable it back, be aware to handle it properly when starting more that one otelcol-contrib, i.e., applying more than one policy.
docker run --net=host netboxlabs/opentelemetry-infinity run --help
Run opentelemetry-infinity
Usage:
opentelemetry-infinity run [flags]
Flags:
-d, --debug Enable verbose (debug level) output
-f, --feature_gates string Define opentelemetry feature gates
-h, --help help for run
-s, --self_telemetry Enable self telemetry for collectors. It is disabled by default to avoid port conflict
-a, --server_host string Define REST Host (default "localhost")
-p, --server_port uint Define REST Port (default 10222)
-e, --set strings Define opentelemetry setThe default otlpinf address is localhost:10222. to change that you can specify host and port when starting otlpinf:
docker run --net=host netboxlabs/opentelemetry-infinity run -a {host} -p {port}otlpinf is aimed to be simple and straightforward.
GET /api/v1/status (gets otlpinf runtime data)
None
http code content-type response 200application/json; charset=utf-8JSON data
curl -X GET -H "Content-Type: application/json" http://localhost:10222/api/v1/status
GET /api/v1/capabilities (gets otelcol-contrib capabilities)
None
http code content-type response 200application/json; charset=utf-8JSON data
curl -X GET -H "Content-Type: application/json" http://localhost:10222/api/v1/capabilities
GET /api/v1/policies (gets all existing policies)
None
http code content-type response 200application/json; charset=utf-8JSON array containing all applied policy names
curl -X GET -H "Content-Type: application/json" http://localhost:10222/api/v1/policies
POST /api/v1/policies (Creates a new policy)
name type data type description None required YAML object yaml format specified in Policy RFC
http code content-type response 201application/x-yaml; charset=UTF-8YAML object 400application/json; charset=UTF-8{ "message": "invalid Content-Type. Only 'application/x-yaml' is supported" }400application/json; charset=UTF-8Any policy error 400application/json; charset=UTF-8{ "message": "only single policy allowed per request" }403application/json; charset=UTF-8{ "message": "config field is required" }409application/json; charset=UTF-8{ "message": "policy already exists" }
curl -X POST -H "Content-Type: application/x-yaml" --data @post.yaml http://localhost:10222/api/v1/policies
GET /api/v1/policies/{policy_name} (gets information of a specific policy)
name type data type description policy_namerequired string The unique policy name
http code content-type response 200application/x-yaml; charset=UTF-8YAML object 404application/json; charset=UTF-8{ "message": "policy not found" }
curl -X GET http://localhost:10222/api/v1/policies/my_policy
DELETE /api/v1/policies/{policy_name} (delete a existing policy)
name type data type description policy_namerequired string The unique policy name
http code content-type response 200application/json; charset=UTF-8{ "message": "my_policy was deleted" }404application/json; charset=UTF-8{ "message": "policy not found" }
curl -X DELETE http://localhost:10222/api/v1/policies/my_policy
my_policy:
receivers:
otlp:
protocols:
http:
grpc:
exporters:
debug:
service:
pipelines:
metrics:
receivers:
- otlp
exporters:
- debug