Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INT - update model #135

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion discovery/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.18
// replace github.com/Axway/agent-sdk => /home/ubuntu/go/src/github.com/Axway/agent-sdk

require (
github.com/Axway/agent-sdk v1.1.57
github.com/Axway/agent-sdk v1.1.60
github.com/Axway/agents-apigee/client v0.0.0-00010101000000-000000000000
github.com/stretchr/testify v1.8.4
)
Expand Down
4 changes: 2 additions & 2 deletions discovery/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/Axway/agent-sdk v1.1.57 h1:i8wa8abL4Oxee/zUAZ+tkJhvsHDmGEPt2YFGhVLjlZU=
github.com/Axway/agent-sdk v1.1.57/go.mod h1:xe6dIpQxE0LcSR+ssGKL4mfyLFbrLohdrB9iMYFUCdU=
github.com/Axway/agent-sdk v1.1.60 h1:an2Gr98pltPbFuKBdPOk92TBQPokyuqzZrftiTJQ8Tc=
github.com/Axway/agent-sdk v1.1.60/go.mod h1:xe6dIpQxE0LcSR+ssGKL4mfyLFbrLohdrB9iMYFUCdU=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
Expand Down
5 changes: 3 additions & 2 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ github.com/Axway/agent-sdk v1.1.41 h1:JLC9ykNQCSIIdzEjFnipBIGD+GUVjv4jRFEZpzCUw6
github.com/Axway/agent-sdk v1.1.41/go.mod h1:Ktgg4H7Y8FigvURTmHNhDdPFJgsITJ5XzB9++sMiOqw=
github.com/Axway/agent-sdk v1.1.43 h1:19OtA+uL1W926v7Qij29TfqBnA1hxOcz/oJEZZN0Gpg=
github.com/Axway/agent-sdk v1.1.43/go.mod h1:Ktgg4H7Y8FigvURTmHNhDdPFJgsITJ5XzB9++sMiOqw=
github.com/Axway/agent-sdk v1.1.60 h1:an2Gr98pltPbFuKBdPOk92TBQPokyuqzZrftiTJQ8Tc=
github.com/Axway/agent-sdk v1.1.60/go.mod h1:xe6dIpQxE0LcSR+ssGKL4mfyLFbrLohdrB9iMYFUCdU=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps=
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM=
github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM=
Expand All @@ -42,7 +45,6 @@ go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dY
go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU=
go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
Expand All @@ -61,7 +63,6 @@ golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g=
Expand Down
2 changes: 1 addition & 1 deletion traceability/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ go 1.18
replace github.com/Axway/agents-apigee/client => ../client

require (
github.com/Axway/agent-sdk v1.1.57
github.com/Axway/agent-sdk v1.1.60
github.com/Axway/agents-apigee/client v0.0.0-00010101000000-000000000000
github.com/elastic/beats/v7 v7.17.5
github.com/gofrs/uuid v4.2.0+incompatible
Expand Down
4 changes: 2 additions & 2 deletions traceability/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/Axway/agent-sdk v1.1.57 h1:i8wa8abL4Oxee/zUAZ+tkJhvsHDmGEPt2YFGhVLjlZU=
github.com/Axway/agent-sdk v1.1.57/go.mod h1:xe6dIpQxE0LcSR+ssGKL4mfyLFbrLohdrB9iMYFUCdU=
github.com/Axway/agent-sdk v1.1.60 h1:an2Gr98pltPbFuKBdPOk92TBQPokyuqzZrftiTJQ8Tc=
github.com/Axway/agent-sdk v1.1.60/go.mod h1:xe6dIpQxE0LcSR+ssGKL4mfyLFbrLohdrB9iMYFUCdU=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
github.com/Azure/go-autorest v12.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw=
Expand Down
5 changes: 3 additions & 2 deletions traceability/pkg/apigee/pollapigeestats.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/Axway/agent-sdk/pkg/cache"
"github.com/Axway/agent-sdk/pkg/jobs"
"github.com/Axway/agent-sdk/pkg/transaction/metric"
metricModels "github.com/Axway/agent-sdk/pkg/transaction/models"
"github.com/Axway/agent-sdk/pkg/transaction/util"
"github.com/Axway/agent-sdk/pkg/util/log"
"github.com/Axway/agents-apigee/client/pkg/apigee"
Expand Down Expand Up @@ -356,7 +357,7 @@ func (j *pollApigeeStats) processMetric(logger log.FieldLogger, metData *metricD
apiID = util.FormatProxyID(metData.name)
}

apiDetail := metric.APIDetails{
apiDetail := metricModels.APIDetails{
ID: apiID,
Name: apiName,
Revision: 1,
Expand All @@ -368,7 +369,7 @@ func (j *pollApigeeStats) processMetric(logger log.FieldLogger, metData *metricD
APIDetails: apiDetail,
Duration: newMetricData.ResponseTime,
Bytes: 0,
AppDetails: metric.AppDetails{},
AppDetails: metricModels.AppDetails{},
}

appendFunc := func(m metric.Detail) {
Expand Down
3 changes: 2 additions & 1 deletion traceability/pkg/apigee/pollapigeestats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

"github.com/Axway/agent-sdk/pkg/cache"
"github.com/Axway/agent-sdk/pkg/transaction/metric"
metricModels "github.com/Axway/agent-sdk/pkg/transaction/models"
"github.com/Axway/agents-apigee/client/pkg/apigee"
"github.com/Axway/agents-apigee/client/pkg/apigee/models"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -37,7 +38,7 @@ func (m *mockCollector) AddMetricDetail(metricDetail metric.Detail) {
m.AddMetric(metricDetail.APIDetails, metricDetail.StatusCode, metricDetail.Duration, metricDetail.Bytes, metricDetail.AppDetails.Name)
}

func (m *mockCollector) AddMetric(apiDetails metric.APIDetails, statusCode string, duration, bytes int64, appName string) {
func (m *mockCollector) AddMetric(apiDetails metricModels.APIDetails, statusCode string, duration, bytes int64, appName string) {
m.mutex.Lock()
defer m.mutex.Unlock()
apiCount := make([]int, 3)
Expand Down