{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
module OpenTelemetry.Resource.DeploymentEnvironment where
import Data.Text (Text)
import OpenTelemetry.Resource
newtype DeploymentEnvironment = DeploymentEnvironment
{ DeploymentEnvironment -> Maybe Text
deploymentEnvironment :: Maybe Text
}
instance ToResource DeploymentEnvironment where
type ResourceSchema DeploymentEnvironment = 'Nothing
toResource :: DeploymentEnvironment
-> Resource (ResourceSchema DeploymentEnvironment)
toResource DeploymentEnvironment {Maybe Text
deploymentEnvironment :: DeploymentEnvironment -> Maybe Text
deploymentEnvironment :: Maybe Text
..} =
[Maybe (Text, Attribute)] -> Resource 'Nothing
forall (r :: Maybe Symbol). [Maybe (Text, Attribute)] -> Resource r
mkResource
[ Text
"deployment.environment" Text -> Maybe Text -> Maybe (Text, Attribute)
forall a.
ToAttribute a =>
Text -> Maybe a -> Maybe (Text, Attribute)
.=? Maybe Text
deploymentEnvironment
]