jaegertracing / jaeger

CNCF Jaeger, a Distributed Tracing Platform
https://www.jaegertracing.io/
Apache License 2.0
20.26k stars 2.42k forks source link

[Feature]: Can you consider adding a parameter at the specified template level #4519

Open eryajf opened 1 year ago

eryajf commented 1 year ago

Requirement

I want to be able to increase the level of the index template similar to the specified number of index fragments.

Problem

We are writing an jaeger-span index to an ES cluster. An index template already exists in the cluster, and the index matched by that template is *, which does not take effect when the index created by parameter such as ES_ARCHIVE_NUM_SHARDS is specified, because the order value in the default created index is 0. I solved this problem by manually increasing the order value of the index written by jaeger.

So I want to be able to add command-line arguments to specify the order value of the template.

Proposal

No response

Open questions

No response

yurishkuro commented 1 year ago

Let's step back.

  1. If the template does not exist in the database the Jaeger backend is supposed to create one.
  2. If the template already exists, what is the expectation from the Jaeger backend? I see only two options: a. either it does not do anything, or b. it makes sure it overrides the template with what the backend thinks is the appropriate shape (possibly controlled by a flag that enables/disables this overriding behavior)

If this mode of operations makes sense, then I don't see that your proposal fits very well in it. Your use case sounds more similar to 2b, but then I don't think Jaeger should be expecting any external inputs like order value, it should do whatever is necessary to update the template.

Thoughts?

eryajf commented 1 year ago

In fact, the existing template is a common template in the cluster, which has nothing to do with jaeger, but because the index set by that template matches all the indexes. when jaeger specifies a replica or shard through the parameter, the actual result is not as expected.

I understand that usually jaeger should use a separate cluster, but sometimes it may connect to a common ES cluster.

For example, this cluster has such a default template at this time:

GET _template/default_template
{
  "index_patterns": ["*"],
  "settings": {
    "order": 0,
    "number_of_shards": 3,
    "number_of_replicas": 1
  }
}

Then I want the index of jaeger-span to have a shards of 5 and a replicas of 0. How should I specify the startup parameters at this time?

yurishkuro commented 1 year ago

Jaeger indexes have specific names, could they not be addressed by that common part of the name instead of "*"?

eryajf commented 1 year ago
*  is the default configuration of the cluster to restrict other index settings.