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

Feature/add event source field #1105

Merged
merged 18 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
e368b91
Add Source field to NewFeatureEvent
andrebenedetti Sep 25, 2023
838ca2b
fix small typo
andrebenedetti Sep 25, 2023
efc21dc
Update tests and comments to include the Source field
andrebenedetti Sep 25, 2023
5906990
Update documentation to include the Source field on the FeatureEvent
andrebenedetti Sep 25, 2023
dc8af91
Fix typos
andrebenedetti Sep 25, 2023
f170b40
Merge branch 'main' of https://github.com/thomaspoignant/go-feature-f…
andrebenedetti Sep 25, 2023
570260f
Update webhook exporter tests to add the Source field
andrebenedetti Sep 25, 2023
cc71b9b
Merge branch 'main' of https://github.com/thomaspoignant/go-feature-f…
andrebenedetti Sep 25, 2023
925defe
Merge branch 'main' into feature/add-event-source-field
andrebenedetti Sep 25, 2023
99c8f77
Update tests to include Source field on FeatureEvent
andrebenedetti Sep 25, 2023
8872bf4
Merge branch 'feature/add-event-source-field' of github.com:andrebene…
andrebenedetti Sep 25, 2023
d155043
Merge branch 'main' into feature/add-event-source-field
thomaspoignant Sep 26, 2023
6335cdd
Update Swagger with the new Source field on the FeatureEvent
andrebenedetti Sep 26, 2023
25c38a0
Merge branch 'feature/add-event-source-field' of github.com:andrebene…
andrebenedetti Sep 26, 2023
976659e
Add 'source' field documentation to Swagger
andrebenedetti Sep 27, 2023
e682a84
Update cmd/relayproxy/controller/collect_eval_data.go
andrebenedetti Sep 27, 2023
c86b3c2
include test for when a custom source field is provided
andrebenedetti Sep 27, 2023
06ece14
Merge branch 'main' into feature/add-event-source-field
thomaspoignant Sep 28, 2023
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,8 @@ It represents individual flag evaluations and is considered "full fidelity" even
"key": "test-flag",
"variation": "Default",
"value": false,
"default": false
"default": false,
"source": "SERVER"
}
```
The format of the data is [described in the documentation](https://gofeatureflag.org/docs/).
Expand Down
2 changes: 1 addition & 1 deletion cmd/relayproxy/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var DefaultExporter = struct {
LogFormat: "[{{ .FormattedDate}}] user=\"{{ .UserKey}}\", flag=\"{{ .Key}}\", value=\"{{ .Value}}\"",
FileName: "flag-variation-{{ .Hostname}}-{{ .Timestamp}}.{{ .Format}}",
CsvFormat: "{{ .Kind}};{{ .ContextKind}};{{ .UserKey}};{{ .CreationDate}};{{ .Key}};{{ .Variation}};" +
"{{ .Value}};{{ .Default}}\n",
"{{ .Value}};{{ .Default}};{{ .Source}}\n",
FlushInterval: 60000 * time.Millisecond,
MaxEventInMemory: 100000,
ParquetCompressionCodec: parquet.CompressionCodec_SNAPPY.String(),
Expand Down
1 change: 1 addition & 0 deletions cmd/relayproxy/controller/collect_eval_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func (h *collectEvalData) Handler(c echo.Context) error {
}

for _, event := range reqBody.Events {
event.Source = "PROVIDER_CACHE"
thomaspoignant marked this conversation as resolved.
Show resolved Hide resolved
h.goFF.CollectEventData(event)
}

Expand Down
5 changes: 5 additions & 0 deletions cmd/relayproxy/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@ const docTemplate = `{
"type": "string",
"example": "feature"
},
"source": {
"description": "Source indicates where the event was generated.\nThis is set to SERVER when the event was evaluated in the relay-proxy and PROVIDER_CACHE when it is evaluated from the cache.",
"type": "string",
"example": "SERVER"
},
"userKey": {
"description": "UserKey The key of the user object used in a feature flag evaluation. Details for the user object used in a feature\nflag evaluation as reported by the \"feature\" event are transmitted periodically with a separate index event.",
"type": "string",
Expand Down
5 changes: 5 additions & 0 deletions cmd/relayproxy/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,11 @@
"type": "string",
"example": "feature"
},
"source": {
"description": "Source indicates where the event was generated.\nThis is set to SERVER when the event was evaluated in the relay-proxy and PROVIDER_CACHE when it is evaluated from the cache.",
"type": "string",
"example": "SERVER"
},
"userKey": {
"description": "UserKey The key of the user object used in a feature flag evaluation. Details for the user object used in a feature\nflag evaluation as reported by the \"feature\" event are transmitted periodically with a separate index event.",
"type": "string",
Expand Down
6 changes: 6 additions & 0 deletions cmd/relayproxy/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ definitions:
A feature event will only be generated if the trackEvents attribute of the flag is set to true.
example: feature
type: string
source:
description: |-
Source indicates where the event was generated.
This is set to SERVER when the event was evaluated in the relay-proxy and PROVIDER_CACHE when it is evaluated from the cache.
example: SERVER
type: string
userKey:
description: |-
UserKey The key of the user object used in a feature flag evaluation. Details for the user object used in a feature
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"kind":"feature","contextKind":"user","userKey":"94a25909-20d8-40cc-8500-fee99b569345","creationDate":1680246000011,"key":"my-feature-flag","variation":"admin-variation","value":"string","default":false,"version":"v1.0.0"}
{"kind":"feature","contextKind":"user","userKey":"94a25909-20d8-40cc-8500-fee99b569345","creationDate":1680246000011,"key":"my-feature-flag","variation":"admin-variation","value":"string","default":false,"version":"v1.0.0","source":"PROVIDER_CACHE"}
15 changes: 8 additions & 7 deletions examples/data_export_file/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package main

import (
"context"
"github.com/thomaspoignant/go-feature-flag/ffcontext"
"log"
"os"
"time"

"github.com/thomaspoignant/go-feature-flag/ffcontext"

"github.com/thomaspoignant/go-feature-flag/exporter/fileexporter"
"github.com/thomaspoignant/go-feature-flag/retriever/fileretriever"

Expand Down Expand Up @@ -60,13 +61,13 @@ func main() {
The output will be something like that:

flag-variation-EXAMPLE-<timestamp>.json:
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234129,"key":"new-admin-access","variation":"True","value":true,"default":false}
{"kind":"feature","contextKind":"user","userKey":"332460b9-a8aa-4f7a-bc5d-9cc33632df9a","creationDate":1618234129,"key":"new-admin-access","variation":"False","value":false,"default":false}
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234129,"key":"unknown-flag","variation":"SdkDefault","value":"defaultValue","default":true}
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234129,"key":"unknown-flag-2","variation":"SdkDefault","value":{"test":"toto"},"default":true}
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234129,"key":"new-admin-access","variation":"True","value":true,"default":false,"source":"SERVER"}
{"kind":"feature","contextKind":"user","userKey":"332460b9-a8aa-4f7a-bc5d-9cc33632df9a","creationDate":1618234129,"key":"new-admin-access","variation":"False","value":false,"default":false,"source":"SERVER"}
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234129,"key":"unknown-flag","variation":"SdkDefault","value":"defaultValue","default":true,"source":"SERVER"}
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234129,"key":"unknown-flag-2","variation":"SdkDefault","value":{"test":"toto"},"default":true,"source":"SERVER"}
----
flag-variation-EXAMPLE-<timestamp>.json:
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234131,"key":"new-admin-access","variation":"True","value":true,"default":false}
{"kind":"feature","contextKind":"user","userKey":"332460b9-a8aa-4f7a-bc5d-9cc33632df9a","creationDate":1618234131,"key":"new-admin-access","variation":"False","value":false,"default":false}
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234131,"key":"new-admin-access","variation":"True","value":true,"default":false,"source":"SERVER"}
{"kind":"feature","contextKind":"user","userKey":"332460b9-a8aa-4f7a-bc5d-9cc33632df9a","creationDate":1618234131,"key":"new-admin-access","variation":"False","value":false,"default":false,"source":"SERVER"}
*/
}
15 changes: 8 additions & 7 deletions examples/data_export_googlecloudstorage/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package main

import (
"context"
"github.com/thomaspoignant/go-feature-flag/ffcontext"
"log"
"os"
"time"

"github.com/thomaspoignant/go-feature-flag/ffcontext"

"github.com/thomaspoignant/go-feature-flag/exporter/gcstorageexporter"
"github.com/thomaspoignant/go-feature-flag/retriever/fileretriever"
"google.golang.org/api/option"
Expand Down Expand Up @@ -69,13 +70,13 @@ func main() {
/*
The content of those files should looks like:
/go-feature-flag/variations/flag-variation-EXAMPLE-<timestamp>.json:
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234129,"key":"new-admin-access","variation":"True","value":true,"default":false}
{"kind":"feature","contextKind":"user","userKey":"332460b9-a8aa-4f7a-bc5d-9cc33632df9a","creationDate":1618234129,"key":"new-admin-access","variation":"False","value":false,"default":false}
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234129,"key":"unknown-flag","variation":"SdkDefault","value":"defaultValue","default":true}
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234129,"key":"unknown-flag-2","variation":"SdkDefault","value":{"test":"toto"},"default":true}
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234129,"key":"new-admin-access","variation":"True","value":true,"default":false,"source":"SERVER"}
{"kind":"feature","contextKind":"user","userKey":"332460b9-a8aa-4f7a-bc5d-9cc33632df9a","creationDate":1618234129,"key":"new-admin-access","variation":"False","value":false,"default":false,"source":"SERVER"}
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234129,"key":"unknown-flag","variation":"SdkDefault","value":"defaultValue","default":true,"source":"SERVER"}
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234129,"key":"unknown-flag-2","variation":"SdkDefault","value":{"test":"toto"},"default":true,"source":"SERVER"}
----
/go-feature-flag/variations/flag-variation-EXAMPLE-<timestamp>.json:
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234131,"key":"new-admin-access","variation":"True","value":true,"default":false}
{"kind":"feature","contextKind":"user","userKey":"332460b9-a8aa-4f7a-bc5d-9cc33632df9a","creationDate":1618234131,"key":"new-admin-access","variation":"False","value":false,"default":false}
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234131,"key":"new-admin-access","variation":"True","value":true,"default":false,"source":"SERVER"}
{"kind":"feature","contextKind":"user","userKey":"332460b9-a8aa-4f7a-bc5d-9cc33632df9a","creationDate":1618234131,"key":"new-admin-access","variation":"False","value":false,"default":false,"source":"SERVER"}
*/
}
19 changes: 10 additions & 9 deletions examples/data_export_s3/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ package main

import (
"context"
"log"
"os"
"time"

"github.com/aws/aws-sdk-go-v2/config"
ffclient "github.com/thomaspoignant/go-feature-flag"
"github.com/thomaspoignant/go-feature-flag/exporter/s3exporterv2"
"github.com/thomaspoignant/go-feature-flag/ffcontext"
"github.com/thomaspoignant/go-feature-flag/retriever/fileretriever"
"log"
"os"
"time"
)

func main() {
Expand Down Expand Up @@ -68,13 +69,13 @@ func main() {
/*
The content of those files should looks like:
/go-feature-flag/variations/flag-variation-EXAMPLE-<timestamp>.json:
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234129,"key":"new-admin-access","variation":"True","value":true,"default":false}
{"kind":"feature","contextKind":"user","userKey":"332460b9-a8aa-4f7a-bc5d-9cc33632df9a","creationDate":1618234129,"key":"new-admin-access","variation":"False","value":false,"default":false}
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234129,"key":"unknown-flag","variation":"SdkDefault","value":"defaultValue","default":true}
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234129,"key":"unknown-flag-2","variation":"SdkDefault","value":{"test":"toto"},"default":true}
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234129,"key":"new-admin-access","variation":"True","value":true,"default":false,"source":"SERVER"}
{"kind":"feature","contextKind":"user","userKey":"332460b9-a8aa-4f7a-bc5d-9cc33632df9a","creationDate":1618234129,"key":"new-admin-access","variation":"False","value":false,"default":false,"source":"SERVER"}
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234129,"key":"unknown-flag","variation":"SdkDefault","value":"defaultValue","default":true,"source":"SERVER"}
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234129,"key":"unknown-flag-2","variation":"SdkDefault","value":{"test":"toto"},"default":true,"source":"SERVER"}
----
/go-feature-flag/variations/flag-variation-EXAMPLE-<timestamp>.json:
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234131,"key":"new-admin-access","variation":"True","value":true,"default":false}
{"kind":"feature","contextKind":"user","userKey":"332460b9-a8aa-4f7a-bc5d-9cc33632df9a","creationDate":1618234131,"key":"new-admin-access","variation":"False","value":false,"default":false}
{"kind":"feature","contextKind":"anonymousUser","userKey":"aea2fdc1-b9a0-417a-b707-0c9083de68e3","creationDate":1618234131,"key":"new-admin-access","variation":"True","value":true,"default":false,"source":"SERVER"}
{"kind":"feature","contextKind":"user","userKey":"332460b9-a8aa-4f7a-bc5d-9cc33632df9a","creationDate":1618234131,"key":"new-admin-access","variation":"False","value":false,"default":false,"source":"SERVER"}
*/
}
2 changes: 1 addition & 1 deletion exporter/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

const DefaultCsvTemplate = "{{ .Kind}};{{ .ContextKind}};{{ .UserKey}};{{ .CreationDate}};{{ .Key}};{{ .Variation}};" +
"{{ .Value}};{{ .Default}}\n"
"{{ .Value}};{{ .Default}};{{ .Source}}\n"
const DefaultFilenameTemplate = "flag-variation-{{ .Hostname}}-{{ .Timestamp}}.{{ .Format}}"

// ParseTemplate is parsing the template given by the config or use the default template
Expand Down
8 changes: 4 additions & 4 deletions exporter/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ func TestFormatEventInCSV(t *testing.T) {
csvTemplate: exporter.ParseTemplate("exporterExample", exporter.DefaultCsvTemplate, exporter.DefaultCsvTemplate),
event: exporter.FeatureEvent{
Kind: "feature", ContextKind: "anonymousUser", UserKey: "ABCD", CreationDate: 1617970547, Key: "random-key",
Variation: "Default", Value: "YO", Default: false,
Variation: "Default", Value: "YO", Default: false, Source: "SERVER",
},
},
want: "feature;anonymousUser;ABCD;1617970547;random-key;Default;YO;false\n",
want: "feature;anonymousUser;ABCD;1617970547;random-key;Default;YO;false;SERVER\n",
wantErr: assert.NoError,
},
}
Expand Down Expand Up @@ -165,9 +165,9 @@ func TestFormatEventInJSON(t *testing.T) {
name: "valid",
args: args{event: exporter.FeatureEvent{
Kind: "feature", ContextKind: "anonymousUser", UserKey: "ABCD", CreationDate: 1617970547, Key: "random-key",
Variation: "Default", Value: "YO", Default: false,
Variation: "Default", Value: "YO", Default: false, Source: "SERVER",
}},
want: "{\"kind\":\"feature\",\"contextKind\":\"anonymousUser\",\"userKey\":\"ABCD\",\"creationDate\":1617970547,\"key\":\"random-key\",\"variation\":\"Default\",\"value\":\"YO\",\"default\":false,\"version\":\"\"}\n",
want: "{\"kind\":\"feature\",\"contextKind\":\"anonymousUser\",\"userKey\":\"ABCD\",\"creationDate\":1617970547,\"key\":\"random-key\",\"variation\":\"Default\",\"value\":\"YO\",\"default\":false,\"version\":\"\",\"source\":\"SERVER\"}\n",
wantErr: assert.NoError,
},
}
Expand Down
15 changes: 8 additions & 7 deletions exporter/data_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ package exporter_test
import (
"context"
"errors"
"github.com/thomaspoignant/go-feature-flag/exporter"
"github.com/thomaspoignant/go-feature-flag/ffcontext"
"log"
"os"
"testing"
"time"

"github.com/thomaspoignant/go-feature-flag/exporter"
"github.com/thomaspoignant/go-feature-flag/ffcontext"

"github.com/stretchr/testify/assert"
"github.com/thomaspoignant/go-feature-flag/testutils/mock"

Expand All @@ -26,7 +27,7 @@ func TestDataExporterScheduler_flushWithTime(t *testing.T) {
inputEvents := []exporter.FeatureEvent{
exporter.NewFeatureEvent(
ffcontext.NewEvaluationContextBuilder("ABCD").AddCustom("anonymous", true).Build(), "random-key",
"YO", "defaultVar", false, ""),
"YO", "defaultVar", false, "", "SERVER"),
}

for _, event := range inputEvents {
Expand All @@ -48,7 +49,7 @@ func TestDataExporterScheduler_flushWithNumberOfEvents(t *testing.T) {
for i := 0; i <= 100; i++ {
inputEvents = append(inputEvents, exporter.NewFeatureEvent(
ffcontext.NewEvaluationContextBuilder("ABCD").AddCustom("anonymous", true).Build(),
"random-key", "YO", "defaultVar", false, ""))
"random-key", "YO", "defaultVar", false, "", "SERVER"))
}
for _, event := range inputEvents {
dc.AddEvent(event)
Expand All @@ -67,7 +68,7 @@ func TestDataExporterScheduler_defaultFlush(t *testing.T) {
for i := 0; i <= 100000; i++ {
inputEvents = append(inputEvents, exporter.NewFeatureEvent(
ffcontext.NewEvaluationContextBuilder("ABCD").AddCustom("anonymous", true).Build(),
"random-key", "YO", "defaultVar", false, ""))
"random-key", "YO", "defaultVar", false, "", "SERVER"))
}
for _, event := range inputEvents {
dc.AddEvent(event)
Expand All @@ -92,7 +93,7 @@ func TestDataExporterScheduler_exporterReturnError(t *testing.T) {
for i := 0; i <= 200; i++ {
inputEvents = append(inputEvents, exporter.NewFeatureEvent(
ffcontext.NewEvaluationContextBuilder("ABCD").AddCustom("anonymous", true).Build(),
"random-key", "YO", "defaultVar", false, ""))
"random-key", "YO", "defaultVar", false, "", "SERVER"))
}
for _, event := range inputEvents {
dc.AddEvent(event)
Expand All @@ -114,7 +115,7 @@ func TestDataExporterScheduler_nonBulkExporter(t *testing.T) {
for i := 0; i < 100; i++ {
inputEvents = append(inputEvents, exporter.NewFeatureEvent(
ffcontext.NewEvaluationContextBuilder("ABCD").AddCustom("anonymous", true).Build(),
"random-key", "YO", "defaultVar", false, ""))
"random-key", "YO", "defaultVar", false, "", "SERVER"))
}
for _, event := range inputEvents {
dc.AddEvent(event)
Expand Down
9 changes: 8 additions & 1 deletion exporter/feature_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package exporter

import (
"encoding/json"
"github.com/thomaspoignant/go-feature-flag/ffcontext"
"time"

"github.com/thomaspoignant/go-feature-flag/ffcontext"
)

func NewFeatureEvent(
Expand All @@ -13,6 +14,7 @@ func NewFeatureEvent(
variation string,
failed bool,
version string,
source string,
) FeatureEvent {
contextKind := "user"
if ctx.IsAnonymous() {
Expand All @@ -29,6 +31,7 @@ func NewFeatureEvent(
Value: value,
Default: failed,
Version: version,
Source: source,
}
}

Expand Down Expand Up @@ -68,6 +71,10 @@ type FeatureEvent struct {
// Version contains the version of the flag. If the field is omitted for the flag in the configuration file
// the default version will be 0.
Version string `json:"version" example:"v1.0.0" parquet:"name=version, type=BYTE_ARRAY, convertedtype=UTF8"`

// Source indicates where the event was generated.
// This is set to SERVER when the event was evaluated in the relay-proxy and PROVIDER_CACHE when it is evaluated from the cache.
Source string `json:"source" example:"SERVER" parquet:"name=source, type=BYTE_ARRAY, convertedtype=UTF8"`
}

// MarshalInterface marshals all interface type fields in FeatureEvent into JSON-encoded string.
Expand Down
Loading