Remove document id

This commit is contained in:
Mak Muftic 2021-09-17 15:14:39 +02:00
parent 0962e73e3e
commit a685ccc955

View File

@ -14,10 +14,7 @@ import (
)
const (
ElasticSearch_INDEX = "lotus2"
ElasticSearch_DOC_LOTUS = "doc_lotus"
ElasticSearch_DOC_PUBSUB = "doc_pubsub"
ElasticSearch_INDEX = "lotus-pubsub"
)
func NewElasticSearchTransport(connectionString string) (TracerTransport, error) {
@ -55,13 +52,11 @@ type elasticSearchTransport struct {
func (est *elasticSearchTransport) Transport(evt TracerTransportEvent) error {
var e interface{}
var docId string
if evt.lotusTraceEvent != nil {
e = *evt.lotusTraceEvent
docId = ElasticSearch_DOC_PUBSUB
} else if evt.pubsubTraceEvent != nil {
e = *evt.pubsubTraceEvent
docId = ElasticSearch_DOC_PUBSUB
} else {
return nil
}
@ -73,7 +68,6 @@ func (est *elasticSearchTransport) Transport(evt TracerTransportEvent) error {
req := esapi.IndexRequest{
Index: ElasticSearch_INDEX,
DocumentID: docId,
Body: strings.NewReader(string(jsonEvt)),
Refresh: "true",
}