-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
393c8e2
commit be92fbe
Showing
6 changed files
with
114 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...ature/sdk-otel4s/src/main/scala/io/cardell/openfeature/otel4s/FeatureFlagAttributes.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright 2023 Alex Cardell | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.cardell.openfeature.otel4s | ||
|
||
import org.typelevel.otel4s.AttributeKey | ||
|
||
// Shim attributes until they are moved from experimental to stable | ||
object FeatureFlagAttributes { | ||
val FeatureFlagKey: AttributeKey[String] = AttributeKey("feature_flag.key") | ||
|
||
/** The name of the service provider that performs the flag evaluation. | ||
*/ | ||
val FeatureFlagProviderName: AttributeKey[String] = AttributeKey( | ||
"feature_flag.provider_name" | ||
) | ||
|
||
/** SHOULD be a semantic identifier for a value. If one is unavailable, a | ||
* stringified version of the value can be used. <p> | ||
* @note | ||
* <p> A semantic identifier, commonly referred to as a variant, provides a | ||
* means for referring to a value without including the value itself. This | ||
* can provide additional context for understanding the meaning behind a | ||
* value. For example, the variant `red` maybe be used for the value | ||
* `#c05543`. <p> A stringified version of the value can be used in | ||
* situations where a semantic identifier is unavailable. String | ||
* representation of the value should be determined by the implementer. | ||
*/ | ||
val FeatureFlagVariant: AttributeKey[String] = AttributeKey( | ||
"feature_flag.variant" | ||
) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
openfeature/sdk/src/main/scala/io/cardell/openfeature/HookContext.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters