Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • main
  • v1.0.0
  • v1.1.0
  • v1.1.1
  • v1.1.2
  • v1.1.3
  • v1.1.4
  • v1.1.5
  • v1.1.6
  • v1.1.7
  • v1.1.8
  • v1.1.9
  • v1.10.0
  • v1.100.0
  • v1.101.0
  • v1.102.0
  • v1.103.0
  • v1.104.0
  • v1.105.0
  • v1.106.0
  • v1.107.0
  • v1.108.0
  • v1.109.0
  • v1.11.0
  • v1.110.0
  • v1.111.0
  • v1.112.0
  • v1.113.0
  • v1.114.0
  • v1.115.0
  • v1.116.0
  • v1.117.0
  • v1.118.0
  • v1.119.0
  • v1.12.0
  • v1.120.0
  • v1.121.0
  • v1.122.0
  • v1.123.0
  • v1.124.0
  • v1.125.0
  • v1.126.0
  • v1.127.0
  • v1.128.0
  • v1.129.0
  • v1.13.0
  • v1.130.0
  • v1.131.0
  • v1.132.0
  • v1.133.0
  • v1.134.0
  • v1.135.0
  • v1.136.0
  • v1.137.0
  • v1.138.0
  • v1.139.0
  • v1.14.0
  • v1.140.0
  • v1.141.0
  • v1.142.0
  • v1.143.0
  • v1.144.0
  • v1.145.0
  • v1.146.0
  • v1.147.0
  • v1.148.0
  • v1.149.0
  • v1.15.0
  • v1.150.0
  • v1.151.0
  • v1.152.0
  • v1.153.0
  • v1.154.0
  • v1.155.0
  • v1.156.0
  • v1.157.0
  • v1.158.0
  • v1.159.0
  • v1.16.0
  • v1.160.0
  • v1.161.0
  • v1.162.0
  • v1.163.0
  • v1.164.0
  • v1.165.0
  • v1.166.0
  • v1.167.0
  • v1.168.0
  • v1.169.0
  • v1.17.0
  • v1.170.0
  • v1.171.0
  • v1.172.0
  • v1.173.0
  • v1.174.0
  • v1.175.0
  • v1.176.0
  • v1.177.0
  • v1.178.0
  • v1.179.0
  • v1.18.0
101 results

Target

Select target project
  • bob-public-utils/bobgroup-go-utils
1 result
Select Git revision
  • main
  • v1.0.0
  • v1.1.0
  • v1.1.1
  • v1.1.2
  • v1.1.3
  • v1.1.4
  • v1.1.5
  • v1.1.6
  • v1.1.7
  • v1.1.8
  • v1.1.9
  • v1.10.0
  • v1.100.0
  • v1.101.0
  • v1.102.0
  • v1.103.0
  • v1.104.0
  • v1.105.0
  • v1.106.0
  • v1.107.0
  • v1.108.0
  • v1.109.0
  • v1.11.0
  • v1.110.0
  • v1.111.0
  • v1.112.0
  • v1.113.0
  • v1.114.0
  • v1.115.0
  • v1.116.0
  • v1.117.0
  • v1.118.0
  • v1.119.0
  • v1.12.0
  • v1.120.0
  • v1.121.0
  • v1.122.0
  • v1.123.0
  • v1.124.0
  • v1.125.0
  • v1.126.0
  • v1.127.0
  • v1.128.0
  • v1.129.0
  • v1.13.0
  • v1.130.0
  • v1.131.0
  • v1.132.0
  • v1.133.0
  • v1.134.0
  • v1.135.0
  • v1.136.0
  • v1.137.0
  • v1.138.0
  • v1.139.0
  • v1.14.0
  • v1.140.0
  • v1.141.0
  • v1.142.0
  • v1.143.0
  • v1.144.0
  • v1.145.0
  • v1.146.0
  • v1.147.0
  • v1.148.0
  • v1.149.0
  • v1.15.0
  • v1.150.0
  • v1.151.0
  • v1.152.0
  • v1.153.0
  • v1.154.0
  • v1.155.0
  • v1.156.0
  • v1.157.0
  • v1.158.0
  • v1.159.0
  • v1.16.0
  • v1.160.0
  • v1.161.0
  • v1.162.0
  • v1.163.0
  • v1.164.0
  • v1.165.0
  • v1.166.0
  • v1.167.0
  • v1.168.0
  • v1.169.0
  • v1.17.0
  • v1.170.0
  • v1.171.0
  • v1.172.0
  • v1.173.0
  • v1.174.0
  • v1.175.0
  • v1.176.0
  • v1.177.0
  • v1.178.0
  • v1.179.0
  • v1.18.0
101 results
Show changes
......@@ -11,7 +11,6 @@ import (
"github.com/aws/aws-sdk-go/service/sqs"
"gitlab.com/uafrica/go-utils/errors"
"gitlab.com/uafrica/go-utils/logger"
"gitlab.com/uafrica/go-utils/logs"
"gitlab.com/uafrica/go-utils/queues"
)
......@@ -95,11 +94,6 @@ type QueueProducer struct {
}
func (m *QueueProducer) Send(event queues.Event) (string, error) {
startTime := time.Now()
defer func() {
logs.LogSQSSent(startTime, event.QueueName, event.TypeName, event.BodyJSON)
}()
//add params as message attributes
msgAttrs := make(map[string]*sqs.MessageAttributeValue)
for key, val := range event.ParamValues {
......
......@@ -8,12 +8,10 @@ import (
"net/http"
"reflect"
"strings"
"time"
opensearchapi "github.com/opensearch-project/opensearch-go/opensearchapi"
"gitlab.com/uafrica/go-utils/errors"
"gitlab.com/uafrica/go-utils/logger"
"gitlab.com/uafrica/go-utils/logs"
"gitlab.com/uafrica/go-utils/reflection"
)
......@@ -204,11 +202,6 @@ func (ds *documentStore) Search(query Query, limit int64) (ids []string, totalCo
Body: bytes.NewReader(jsonBody),
}
startTime := time.Now()
defer func() {
logs.LogSearch(startTime, ds.name, string(jsonBody))
}()
searchResponse, err := search.Do(context.Background(), ds.w.client)
if err != nil {
err = errors.Wrapf(err, "failed to search documents")
......
......@@ -13,7 +13,6 @@ import (
opensearchapi "github.com/opensearch-project/opensearch-go/opensearchapi"
"gitlab.com/uafrica/go-utils/errors"
"gitlab.com/uafrica/go-utils/logger"
"gitlab.com/uafrica/go-utils/logs"
"gitlab.com/uafrica/go-utils/reflection"
)
......@@ -392,11 +391,6 @@ func (ts *timeSeries) Search(query Query, limit int64) (docs interface{}, totalC
Body: bytes.NewReader(jsonBody),
}
startTime := time.Now()
defer func() {
logs.LogSearch(startTime, ts.name+"-*", string(jsonBody))
}()
searchResponse, err := search.Do(context.Background(), ts.w.client)
if err != nil {
err = errors.Wrapf(err, "failed to search documents")
......
......@@ -9,7 +9,6 @@ import (
"gitlab.com/uafrica/go-utils/audit"
"gitlab.com/uafrica/go-utils/errors"
"gitlab.com/uafrica/go-utils/logger"
"gitlab.com/uafrica/go-utils/logs"
"gitlab.com/uafrica/go-utils/queues"
"gitlab.com/uafrica/go-utils/string_utils"
)
......@@ -54,10 +53,6 @@ type Context interface {
//write a data change audit event
AuditChange(eventType string, orgValue, newValue interface{})
//Sleep() does a time.Sleep and record it in log actions so that we can account for the time spent sleeping
//vs e.g. time waiting for outgoing API calls or db queries
Sleep(dur time.Duration)
}
//values: are added to context and logger
......@@ -233,11 +228,3 @@ func (ctx *serviceContext) AuditChange(eventType string, orgValue, newValue inte
return
}
}
func (ctx *serviceContext) Sleep(dur time.Duration) {
if dur > 0 {
startTime := time.Now()
time.Sleep(dur)
logs.LogSleep(startTime)
}
}