Skip to content

Commit

Permalink
core: fix example for :table (#1724)
Browse files Browse the repository at this point in the history
The example stack was not valid. Fix it and add tests
for the examples on event and trace vocabularies.
  • Loading branch information
brharrington authored Nov 14, 2024
1 parent 193314c commit 3210344
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ object EventVocabulary extends Vocabulary {
|Find matching events and create a row by extracting the specified columns.
|""".stripMargin

override def examples: List[String] = List("name,sps,:eq")
override def examples: List[String] = List("level,ERROR,:eq,(,message,)")
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright 2014-2024 Netflix, Inc.
*
* 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 com.netflix.atlas.core.model

import com.netflix.atlas.core.stacklang.BaseExamplesSuite
import com.netflix.atlas.core.stacklang.Vocabulary

class EventExamplesSuite extends BaseExamplesSuite {

override def vocabulary: Vocabulary = EventVocabulary
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright 2014-2024 Netflix, Inc.
*
* 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 com.netflix.atlas.core.model

import com.netflix.atlas.core.stacklang.BaseExamplesSuite
import com.netflix.atlas.core.stacklang.Vocabulary

class TraceExamplesSuite extends BaseExamplesSuite {

override def vocabulary: Vocabulary = TraceVocabulary
}

0 comments on commit 3210344

Please sign in to comment.