Skip to content

Commit

Permalink
feed - drop spans entirely
Browse files Browse the repository at this point in the history
  • Loading branch information
DamianZaremba committed Dec 18, 2024
1 parent d3c1dbe commit dd6a37e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions pkg/cbng/feed/feed.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ package feed

import (
"bufio"
"context"
"encoding/json"
"github.com/cluebotng/botng/pkg/cbng/config"
"github.com/cluebotng/botng/pkg/cbng/metrics"
"github.com/cluebotng/botng/pkg/cbng/model"
"github.com/prometheus/client_golang/prometheus"
uuid "github.com/satori/go.uuid"
"github.com/sirupsen/logrus"
"go.opentelemetry.io/otel/attribute"
"net/http"
"strings"
"sync"
Expand Down Expand Up @@ -49,18 +47,13 @@ func handleLine(logger *logrus.Entry, line string, configuration *config.Configu
logger.Tracef("Received: %+v", httpChange)

if httpChange.Type == "edit" && httpChange.ServerName == configuration.Wikipedia.Host {
_, span := metrics.OtelTracer.Start(context.Background(), "feed.ConsumeHttpChangeEvents.event")
rootUUID := uuid.NewV4().String()
span.SetAttributes(attribute.String("uuid", rootUUID))
defer span.End()

namespace := strings.TrimRight(httpChange.Namespace, ":")
if namespace == "" {
namespace = "main"
}

change := model.ProcessEvent{
Uuid: rootUUID,
Uuid: uuid.NewV4().String(),
ReceivedTime: time.Now().UTC(),
Common: model.ProcessEventCommon{
Namespace: namespace,
Expand Down

0 comments on commit dd6a37e

Please sign in to comment.